187
Senior Design II Document EEL 4914 Christian Braun Rashon Hogan Jelani Jackson

 · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

Senior Design II DocumentEEL 4914

Christian Braun

Rashon Hogan

Jelani Jackson

Donald Thomson

Page 2:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

ii

Page 3:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

Table of Contents

1.0 Executive Summary 1

2.0 Project Description 2

2.1 Motivation 2

2.2 Beer Pong History3

2.3 Beer Pong Game Description 4

2.4 Objectives 6

2.4.1 ARM Central Controller 6

2.4.2 MSP430 MCU Objectives 7

2.4.3 Sensors 8

2.4.3.1 Cup Sensor Objectives 8

2.4.3.2 Infrared Barrier Objectives 8

2.4.4 Ball Washer Objectives 9

2.5 Requirements and Specifications 9

3.0 Research Related to Project Definition 11

3.1 Existing Similar Projects 11

3.1.1 Research 11

3.1.2 Influence and Implementations 13

3.2 Relevant Technologies 15

3.2.1 Central Controller Options 15

3.2.2 MCU Options 25

3.2.3 User Interface Options 30

3.2.4 Aesthetic LED Array 35

3.2.5 Capacitive Touch 38

3.2.6 Cup Sensor LEDs 41

3.2.7 Light Barrier 43

3.2.8 Ball Washer 47

3.3 System Architecture Options 51

4.0 Project Hardware and Software Design 52

4.1 Design Summary 52

4.2 System Architecture 55

iii

Page 4:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

4.3 Subsystems 56

4.3.1 Central Controller 56

4.3.2 User Interface 61

4.3.3 Aesthetic LED Array 70

4.3.4 Cup Sensors 83

4.3.5 Light Barrier 89

4.3.6 Ball Washer 95

4.3.7 Power 97

5.0 Prototype Testing 99

5.1 Test Environment 99

5.2 Test Specifications 101

5.2.1 Central Controller 101

5.2.2 User Interface 102

5.2.3 Cup Sensors 105

5.2.4 Discretized Laser Barrier 107

6.0 Administrative Content 109

6.1 Division of Labor 109

6.2 Milestones 109

6.2.1 Senior Design 1 109

6.2.2 Senior Design 2 110

6.3 Budget 111

7.0 User Manual 111

7.1 Setup 111

7.2 Playing A Game 112

7.3 User Interface 114

7.4 Breakdown 115

iv

Page 5:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

List of FiguresFIGURE 1: SIMPLIFIED TABLE LAYOUT............................................................5FIGURE 2: EXAMPLE OF COMMERCIAL TABLE.............................................12FIGURE 3: STELLARIS UART MODULE BLOCK DIAGRAM.............................18FIGURE 4: ATMEL AT91SAM UART FUNCTIONAL BLOCK DIAGRAM...........19FIGURE 5: OKI ML674000 UART FUNCTIONAL BLOCK DIAGRAM................20FIGURE 6: ATMEL AT91SAM SPI BLOCK DIAGRAM.......................................22FIGURE 7: STELLARIS SSI MODULE BLOCK DIAGRAM.................................23FIGURE 8: STELLARIS I2C BLOCK DIAGRAM.................................................24FIGURE 9: MSP430 USART BLOCK DIAGRAM................................................27FIGURE 10: ATMEL AT32UC3A0128 SSC BLOCK DIAGRAM..........................28FIGURE 11: MICROCHIP PIC SI BLOCK DIAGRAM.........................................29FIGURE 12: MSP430 I2C BLOCK DIAGRAM.....................................................30FIGURE 13: REGION SEGREGATION ILLUSTRATION....................................36FIGURE 14: ANIMATION ILLUSTRATION.........................................................36FIGURE 15: LED PLACEMENT ILLUSTRATION...............................................36FIGURE 16: ILLUSTRATION OF A PCB CAPACITIVE TOUCH UNIT...............39FIGURE 17: ILLUSTRATION OF HOW THE CAPACITIVE TOUCH UNIT

MEASURES CAPACITANCE.......................................................................40FIGURE 18: LAYOUT AND DIMENSIONS OF TI CAPACITIVE TOUCH UNIT..41FIGURE 19: TLC5940 BLOCK DIAGRAM..........................................................42FIGURE 20: SIMPLIFIED EMITTER...................................................................44FIGURE 21: SIMPLIFIED DETECTOR...............................................................45FIGURE 22: EXAMPLE OF SHARP GP2D FUNCTIONALITY...........................46FIGURE 23: PULSED INFRARED SIGNAL FILTERING....................................47FIGURE 24: PELTIER DEVICE PASTEURIZATION ILLUSTRATION................50FIGURE 25: HEATER/RADIATOR PASTEURIZATION ILLUSTRATION...........50FIGURE 26: EVENT DRIVEN ARCHITECTURE................................................52FIGURE 27: DCPPTSS BLOCK DIAGRAM........................................................53FIGURE 28: DCPPTSS OVERALL ACTIVITY DIAGRAM...................................56FIGURE 29: I2C MASTER-SLAVE COMMUNICATION......................................57FIGURE 30: USER INTERFACE SCHEMATIC..................................................63FIGURE 31: MENU ACTIVITY DIAGRAM..........................................................64FIGURE 32: MENU NAVIGATION ILLUSTRATION............................................64FIGURE 33A: MISS ACTIVITY DIAGRAM..........................................................66FIGURE 33B: SKIP ACTIVITY DIAGRAM..........................................................66FIGURE 33C: FORFEIT ACTIVITY DIAGRAM...................................................66FIGURE 34: RE-RACK ACTIVITY DIAGRAM.....................................................67FIGURE 35: CNUTD ACTIVITY DIAGRAM........................................................68

v

Page 6:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

FIGURE 36: 16X2 LCD PLACEMENT ILLUSTRATION......................................69FIGURE 37: 16X2 BUTTON LAYOUT................................................................70FIGURE 38: LED ARRAY DECODER WIRING DIAGRAM.................................70FIGURE 39: CHARLIEPLEXING ILLUSTRATION..............................................72FIGURE 40: AESTHETIC LED CONTROL SCHEMATIC...................................74FIGURE 41: MAIN ANIMATION BOARD ILLUSTRATION..................................75FIGURE 42: AESTHETIC LED CONTROL ILLUSTRATION...............................76FIGURE 43: AESTHETIC LED PLACEMENT DIAGRAM...................................77FIGURE 44: AESTHETIC LED WIRING DIAGRAM............................................78FIGURE 45: LED PERIMETER CONFIGURATION............................................78FIGURE 46: ROCK LEDS...................................................................................81FIGURE 47: BOUNCE LEDS..............................................................................81FIGURE 48: ROLL LEDS....................................................................................81FIGURE 49: SCATTER LEDS.............................................................................83FIGURE 50: CIRCLE LEDS................................................................................83FIGURE 51: HALT FLASH LEDS........................................................................83FIGURE 52: CUP SENSOR BLOCK DIAGRAM.................................................83FIGURE 53: BEGINNING OF GAME/TEAM SELECTION SEQUENCE

DIAGRAM.....................................................................................................84FIGURE 54: CUP SENSOR SUBSYSTEM GAME BEHAVIOR SEQUENCE

DIAGRAM.....................................................................................................85FIGURE 55: CUP SENSOR UNIT LAYOUT.......................................................86FIGURE 56: DIRECT CONTROL OF CUP SENSORS WITH MSP430 WIRING

DIAGRAM FOR ONE SIDE OF TABLE........................................................87FIGURE 57: CUP SENSOR SUBSYSTEM WIRING DIAGRAM FOR ONE SIDE

OF TABLE....................................................................................................89FIGURE 58: LAYOUT OF EMITTERS AND DETECTORS IN SINGLE SIDED

DESIGN........................................................................................................90FIGURE 59: CUSTOM OBJECT DETECTION CIRCUIT FOR SINGLE SIDED

DESIGN........................................................................................................91FIGURE 60: EMITTER/DETECTOR RAIL PAIR DESIGN ILLUSTRATION........92FIGURE 61: DISCRETIZED TABLE DESIGN ILLUSTRATION..........................93FIGURE 62: BALL WASHER RESERVOIR........................................................95FIGURE 63: BALL WASHER ILLUSTRATION....................................................96FIGURE 64: BALL WASHER LAYOUT ILLUSTRATION....................................96FIGURE 65: POWER SUPPLY WIRES..............................................................98FIGURE 66: POWER RAIL ILLUSTRATION.......................................................99FIGURE 67: THE EXPLANATION OF THE RATINGS THAT THE TESTERS

WILL USE TO DESCRIBE THEIR EXPERIENCE WITH THE MENU NAVIGATION SYSTEM..............................................................................104

FIGURE 68: PLUGGING IN THE DCPPTS.......................................................112

vi

Page 7:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

FIGURE 69: FILLING THE WATER RESERVOIR............................................112FIGURE 70: TEAM SELECTION SCREEN.......................................................113FIGURE 71: ADDING CUPS TO THE PLAY AREA..........................................113FIGURE 72: TEAM WINS SCREEN..................................................................114FIGURE 73: TEAM GAME STATUS SCREEN.................................................114

vii

Page 8:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

List of TablesTABLE 1: BASIC EXAMPLE OF CURRENT GAME INFORMATION

DISPLAYED ON 16X2 LCDTABLE 2: DECODER TRUTH TABLETABLE 3: DECODER VOLTAGE AND RISE/FALL TIMETABLE 4: ANIMATION TRUTH TABLETABLE 5: TABLE USED TO RECORD MEASURED CAPACITANCE CHANGES

TABLE 6:TABLE USED TO RECORD DETECTOR OUTPUT PARAMTERS

TABLE 7: TABLE USED TO RECORD BALL DETECTION THRESHOLDS

TABLE 8: BUDGET

viii

Page 9:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

1.0 Executive SummaryThis document covers the project that Group 6 (from now on referred to as "the group") created for Senior Design. The group chose to call the device it designed the Digital Competitive Precision Projectile Table Support Structure, or DCPPTSS for short. The group chose this project idea to provide a simple, intuitive, and entertaining manner to facilitate a team-based ball-throwing skill game. As a result of this project, the group hopes to allow enthusiasts of this skill-based game to have a more enjoyable interactive experience with the DCPPTSS than otherwise would be possible with normal, [plainer] equipment.

The game consists of two teams of two standing at opposite ends of a long table, trying to throw ping pong balls in cups at their opponents' end of the table arranged in the shape of a triangle. The cups are [somewhat] filled with a liquid to prevent them from falling over when a ball is thrown. Each time a ball lands in a cup, the team at that end removes the cup, and drinks what is in it, making the game more difficult for the scoring team. Once two ping pong balls are thrown by one team, play passes to the other team, and they must try to get the balls in their opponents' cups. The winner is declared when the opposing team is out of cups on the table.

The purpose of the DCPPTSS itself is to follow the relatively simple rules of the skill game, to allow for easier team-tracking and score-keeping, instead of distracting the user from playing the game. Since the game is widely popular, there are many house rules created depending on where it is played. The DCPPTSS is programmed with the basic set of rules that are nearly universal to every match. This will also allow the players of the game to use any and all house rules they wish (for example, what to do in the case of a bounce, lost ball, etc).

The DCPPTSS, as its basic function, is able to track either when a team either makes a ball in a cup or misses. Play will then stop as the DCPPTSS waits for the removal of a hit cup, once two balls have been thrown. In addition, the DCPPTSS includes a method of allowing for multiple teams to sign up to play games as keeping track can be a chore for the players. When the winner of a game is determined, the next team(s) will be automatically chosen. Since the game is usually played at parties or outdoors while tailgating, the DCPPTSS includes a ball washing mechanism that will rinse off dirt and other particles as well as disinfect the ball using ultraviolet (UV) light.

The table is of regulation size (8’x2’34”), and allow for a triangular target area measuring [14”] in length on each side. This allows for each target area contain 6 plastic party cups, measuring [2.5”] in diameter for the base and [3.75”] in diameter for the rim, and [3.75”] high. To detect the presence of each cup, the group used six touch sensors on each end. Each cup is lit from the bottom with LEDs. When a cup is removed, the LEDs are turned off, to show an inactive location. This also allows for uniform setup on each end of the table when

1

Page 10:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

beginning a new game. The table and play area are lined with LEDs. While mostly for aesthetics, the LEDs also signify the currently active team and the target area on each end. When two balls have been thrown, the LEDs signify the other team as the active team and the other target area.

In order to detect when a ball has landed in the target area (i.e. in a cup) or not, the group has decided to create an light barrier above the cups. Ball detection proved to be a unique issue because seemingly no similar table support structure has achieved ball-in-cup detection. Since the DCPPTSS was to be as robust as possible, the group decided against modifying the cups, and instead decided to use the light barrier. Laser diode emitters and photo detectors create a detection grid above the table surface. When a ball passes through the barrier, it is detected via breaking one or more laser beams.

With their design, the group is using six microcontroller units (MCU). All of these MCUs are TI MSP430G2553 microcontrollers. One of these MCUs acts as the central control unit of the entire DCPPTSS system. This MCU keeps track of game state by communicating with the other MCUs, as well as commanding the sub systems of the table to perform actions. The other MCUs act to directly control the laser barrier, cup sensor, and aesthetic LED sub systems.

2.0 Project Description2.1 MotivationThe members of the group have attended the occasional college party or tailgate as responsible, legal-aged adults. Each of these gatherings is characterized by the enjoyment of the company of others and, occasionally, the consumption of libations. Loud music and dancing are also prevalent at such events. At most of these events, additional forms of entertainment are provided, many of which come in the form of a game. As such, the main "competition" of the party-throwers becomes a game of "who has the best entertainment." The pursuit of throwing the best party facilitates the use of party games as entertainment.

One such game is Beer Pong. The members of the group have attended parties at which Beer Pong is played. Each game of Beer Pong that the group has witnessed had its own set of specific rules in addition to the normal rules depending on where it was played. These "house rules" are diverse, and one cannot hope to master them all, while still remembering the rules of the base game itself—especially if mildly inebriated—and concentrating on playing the game.

Quite often it was experienced that the tables selected for use were not long enough, tall enough, or made of differing materials for the ideal game of Beer Pong. This resulted in a less-uniform Beer Pong experience.

Since parties tend to be crowded, with a lot of movement in limited space, many games of Beer Pong are interrupted for one reason or another. The most

2

Page 11:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

frequent of these interruptions affects the play area by disturbing the target cups and the play area. Another area that causes issue is the ball itself. When one misses a throw, the ball often winds up on the floor, behind furniture, and so forth, causing the ball to accumulate foreign particles and bacteria. Most often, a cup of clean water is used to rinse off the ball, but the group has determined that this is inadequate.

Beer pong is quite popular among the parties the group attended. While not only is Beer Pong played at a lot of these parties, but also many people play Beer Pong at these parties. Since it is a team game (where only four people play at a time), and the games can last for quite some time, the group has noticed that many of queues to have a chance to play are ultimately unorganized. This has caused many a confused party-goer and, at best, a less efficient manner of allowing waiting teams to play the popular game.

The group's main goal was to address all of these issues with its Digital Competitive Projectile Table Support Structure (DCPTSS).

First and foremost, the DCPTSS was to provide a simple, portable method to bring the game of Beer Pong anywhere to enhance the party experience, using predetermined "regulation" dimensions and surface materials, allowing for a consistent experience with a similar, manufactured table.

The DCPTSS also tracks the basic rules of the game of Beer Pong. This allows players to concentrate on the house rules and on the game itself. The water-resistant table also gracefully holds the game in the case of interruptions. For example, play will "pause" when a cup is knocked over or off the location it belongs, until it is returned. This means that each team will have the exact same cup placement when competing against one another, allowing for a more fair and competitive game.

The group also wanted to address the sanitary/hygienic issue by including an automatic ball washing system in its DCPTSS. The ball washer removes all of the particulate gathered by the ball like a normal rinse system does, and additionally kills the bacteria accumulated by the ball through the use of an ultraviolet (UV) light.

Finally, the group included a method to track the queue of teams between games of Beer Pong with its DCPTSS. This allows players to fairly be picked for upcoming games, and eventually allow for the tracking of stats for each team through the use of an additional system outside of the table itself.

2.2 Beer Pong HistoryThe game Beer Pong began in the 1950s as a game played by early fraternities. Although documented at many universities, it is unclear which University is responsible for the invention. The first documented records of the game were played by the Delta Upsilon fraternity as today’s variant is played. During this

3

Page 12:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

time period, the game was originally played with paddles, in the same fashion as ping pong. The difference was in beer pong, the objective was to use your paddle to direct the ping pong ball into the infamous “red cup” located on the opponent’s portion of the ping pong table. This form of the game has since been dropped since the 1970’s. The new name for the paddled form of the game beer pong is Beirut. The game had transitioned to a paddle less game variant in which the player used their hand to throw the ping pong ball towards the opponent’s side of the table in attempt to land the ping pong ball into the cup. This variant of the game was called throw pong. Recently, beer pong tables have existed in the past that have attempted to integrate the technologies of the future. A design done by West Virginia University included a lighted circulating ball washer. The design also included lighting animation that was responsive to audio input. Another unnamed design from Colorado University featured capacitive touch sensors to determine cup location and validity. The Table also featured an audio controlled light animation that responded in multiple arrays based on frequency and magnitude. An unnamed project was done and featured on the world’s largest social video sharing site with charge time measuring units to select the color of the cup placement zones.

2.3 Beer Pong Game DescriptionBeer Pong is a party game played by legal-aged adults. In this game, two teams compete to remove their opponent’s cups from the table. This is achieved by throwing a ping pong ball and landing it in a cup. When all cups are removed from one end of the table, the team that scored the shot is declared the winner. Play is then reset and continues with the next team(s) in the queue.

Game Setup - Two teams are needed to play Beer Pong. Each team consists of two players, arbitrarily chosen by the players. Teams that are chosen to play are also chosen arbitrarily, however, most games are played in a first-in-first-out queueing fashion.

In order to set up for the game, 24oz. (2-12oz. cans) of beer or water is given to each team. The teams then fill six (6) cups evening with their allotted liquid. Each cup should contain approximately 4oz. of liquid. Generally, a seventh cup is filled with water for each team. This extra cup acts is considered the ball washer cup. The ball washer cup (or otherwise) is not considered in play and will not count if a ball lands in this cup.

Each team then sets up the six (6) cups with 40z. of liquid on their respective sides. The cups are to be arranged in the form of a triangle with one of the points facing at the opposing team. These cups must be in the center of each teams’ end of the table and the back row of cups must be parallel to the short end of the table. Each cup rim must be touching and no cup may be leaned in any way. The wash cup may be placed anywhere on the table that is not near or touching a target cup. See the below diagram in Figure 1 for an example of setup.

4

Page 13:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

Figure 1: Example set up of a regular beer pong table. Each red circle shows the placement of the target cups, while the blue circles show the placement of the

wash cups. Not to scale.

Each team stands on the short end of their respective side of the table behind their cups. Each team is given one (1) ball at the start; there are two total ping pong balls that will be used. Each team cleans their respective balls in their wash cup.

Beginning the Game - The game begins by determining which team goes first. This can be determined any number of ways. One common way to determine the first playing team has one player on each team throw their balls simultaneously at the opponent’s cups. If they both miss, they try again and the other team member must make the following shot. If neither misses, they throw again, with the other team member taking the next shot as well. If only one team makes a ball in an opponent’s cup, that team gets to decide who shoots first. No cups are removed from the table at this time.

Playing the Game - The team that goes first collects both of the ping pong balls. Each player on that team gets a chance to throw his or her ball at the opponent’s cups in the hopes of landing a ball in a cup. If a ball does not land in any cups, it is collected by the opposing team. If a ball lands in one of the cups, it is also collected by the opposing team, but they must also remove the cup it landed in and drink its contents. Once both balls are thrown, play passes to the other team. However, if both balls land in a cup, one (1) is returned to the shooting team, and they have another chance to land a ball in the target cups. Play continues until one team is left without any cups.

Ending the Game - When a ball is made in the last cup, the cup and ball are removed as normal. The team that is left with zero cups in play now has a chance at “Redemption”. Redemption brings the game into overtime, allowing the

5

Page 14:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

team with no cups left a chance at winning the game. If the opponent has two or more cups remaining, the team has one chance to make a ball in a cup. In the event that the ball lands in a cup, the cup is removed as normal, and the ball is returned to the shooting team. This continues until the team misses. The players must alternate taking shots. If the opponent only has one cup remaining, the team has as many chances to make a ball in the last cup as there are balls on their side of the table (one (1) or two (2) depending if the opponent made the last cup with their first shot or second, respectively). If the shooting team makes a ball in the last cup, play continues in overtime. Otherwise, the team with cups remaining is declared the winner.

Overtime - In overtime, three (3) cups are filled the same way as in setup, however they are arranged in a smaller triangle in the center of each team’s side of the table, pointing at the opponent. Play continues as normal, and all normal play, redemption, and overtime rules apply.

Special Circumstances: Reracks - Reracks may be called by a shooting team at any time. When a rerack is called, the team that called for it may request the rearrangement of their opponent’s cups. The team that called the rerack can choose any configuration of the opponent’s cups that they wish. Each team gets a total of two (2) reracks throughout the game. Reracks can be performed in the middle of a turn.

Rules and Regulations - The group has decided to use the World Series of Beer Pong Full Rules and Regulations as its basis for the rule set for the DCPPTSS. The group has modified some of the rules for ease of use and programming in the project. See Appendix A for the full rules.

Officially, Beer Pong is played on a tables that are 8’x2’x27.5”, however the group has decided to increase the dimensions of their table to 8’x2’x34” after determining the given height of 27.5” was too short. The WSOBP does not specify the material that the surface is made of, however the surface should allow players to bounce the ping pong ball if they so choose (this may have a bearing on certain house rules as noted below). The official cups specified are 16oz. with a top width of 3-5/8”, height of 4-5/8”, and base width of 2-1/4”. However, the group will be using 16oz. Solo cups with a top width of 3.75”, height of 3.75”, and base width of 2.5”. This is because Solo cups are readily available to players everywhere. The official WSOBP specify racks as part of the rules, however they will not be used because the table will have a built in system (LEDS arranged in a circle around each location) for determining the exact position of each cup. The balls used will be 3-star 40mm ping pong balls.

2.4 Objectives2.4.1 Central Controller ObjectivesThe objectives of the MSP430G2553 microcontroller as central control are to maintain the game state of the Digital Competitive Precision Projectile Table

6

Page 15:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

Support Structure (DCPPTSS), receive data from the ball detection sub-system, receive data from the capacitive touch system, output a bit pattern to LEDs depending on the game state, and handle menu interaction from physical buttons. These objectives are described in further detail in the list below.

Communicating with sub-systemso MSP430 MCU

Communicate data to and from MSP430 MCU for given sub-systems

Receive interrupt from laser grid array system Receive change in capacitance of cap touch system

o LEDs Send bit pattern to change pattern of LEDs for a given

situation Pregame light pattern Player turn Score Winner

o Display monitor Display game information to the display monitor

Cups remaining Team number Reracks left Miss/skip turn/forfeit/rerack Score

Handling menu interaction

2.4.2 MSP430 MCU Objectives

There are two specific objectives for the MSP430 microcontrollers for the Digital Competitive Precision Projectile Table Support Structure (DCPPTSS). One of the objectives for the MSP430 is the ball detection system, which takes certain information that it records and transmits it to the central control unit to process for the game state. The other objective for the MSP430 is the capacitive touch system, which also receives certain information and transmits it to the central control unit to process for the game state. These details are described in further detail in the list below

Laser Grid Ball Detectiono Detect the passing of the ball through the plane

Ball entering laser grido Distinguish hits from misses

If ball enters detection plane and leaves throw is recorded as a miss.

7

Page 16:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

If ball enters detection plane and does not leave throw is recorded as a hit

o Relatively inexpensive Capacitive Touch

o Distinguish full from empty/missing cups Reference capacitance will be taken before game starts with

cups full When reference capacitance changes capacitive touch

system knows an event has occurred.o Function as team color selector at beginning of game

LED changes color depending on color selection of user.o Respond to game state changes

If ball was detected send central control results of change in capacitance

o Provide aesthetic appeal

2.4.3 Sensors2.4.3.1 Cup Sensor Objectives

The purpose of the cup sensor peripherals of the table is to detect the presence of a full cup. Each side of the table has 6 cup sensors, one for each cup. Each cup sensor contains a capacitive touch unit, as well as five RGB LEDs, in combination with the LED driver circuit required to control the LEDs. By measuring the capacitance of the area above the sensor, the system can detect the presence of any liquid in each cup. Threshold values are used to determine if a cup is full (active in the game) or empty/not present. The LEDs serve as team color indicators during a game. Players choose their team color at the beginning of each match.

Objectives:

1. Distinguish full from empty/missing cups2. Function as team color selector at beginning of game3. Respond to game state changes4. Provide aesthetic appeal

2.4.3.2 Light Barrier Objectives

The light barrier is an integral part of the DCPPTSS. It allows the system to distinguish a missed shot from a throw which resulted in the ping pong ball landing in a cup. To do this, laser diode emitters and photo detectors are laid out on rails at the edges of the table in two axes. These axes effectively create a coordinate grid above the table surface, used to detect the passing of an object through the barrier.

8

Page 17:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

Objectives:

1. Detect the passing of the ball through the plane2. Distinguish hits from misses3. Be as unobtrusive as possible4. Relatively inexpensive

2.4.4 Ball Washer Objectives1. Submersible2. Water tight3. Nonreactive4. Able to run indefinitely5. Maintain structural integrity over temperature change6. UV resistant

2.5 Requirements and SpecificationsThe group needed an agreed upon set of requirements and specifications on which to base the Digital Competitive Precision Projectile Table Support Structure (DCPPTSS). This allowed the group to easily build and test the DCPPTSS. The following is a list of the requirements and specifications for the DCPPTSS.

DCPPTSS Requirementso Entire System/Table

Able to play ten (10) consecutive games of Beer Pong Able to withstand 8oz. of spilled liquid

o Subsystems Central Control Unit

Able to handle ten (10) consecutive games of Beer Pong

Able to drive at least four (4) MSP430s Able to control at least one (1) user interface module

User Interface Able to handle up to ninety-nine (99) playing teams Provide players the ability to select up to four (4)

functions Able to handle ten (10) consecutive games of Beer Pong

Aesthetic LED Array Able to display up to four (4) different light patterns All components meet 1kHz flicker fusion threshold

frequency Able to display win/loss patterns for ten (10) consecutive

games of Beer Pong Able to display for light patterns for up to six (6)

consecutive hours

9

Page 18:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

Capacitive Touch Sensors Able to detect at least 2oz of liquid Able to distinguish cup with more than 2oz from empty

cup (less than 2oz) Able to distinguish cup positions for up to twelve (12)

cups Able to display six (6) different colors Allow teams to select from six (6) team colors

Infrared Barriers Able to detect 44mm diameter ball Able to detect ball traveling between 1m/s to 5m/s Able distinguish hit from miss with 75% accuracy Able to cover an area 2 feet wide by 4 feet tall

Ball Washer Able to wash up to 2 balls at once Able to accept 120VAC Reservoir cannot be filled to over 1 gallon of water Include UV light of 230-300nm wavelength Pump can run for 24 hours straight

Power Able to supply the DCPPTSS with 350W of power Able to provide three (3) 3.3v, 5v, and 12v rails Able to run continually for up to 6 hours

DCPPTSS Specificationso Subsystems

Central Control Unit Shut down after fifteen (15) minutes of idle time Uses one I2C bus to communicate other devices Stuffs?

User Interface Uses one (1) 16x2 LCD for game display Uses three (3) 30mm arcade-style buttons for menu

navigation 16x2 LCDs and arcade buttons built into one 6”x4”

modules Aesthetic LED array

LED voltage range: 1.5-6v LEDs are 5mm in diameter LED viewable angle of 60 degrees

Capacitive Touch Sensors Total diameter of 3-7/8” Capacitive touch device dimensions are 2-1/16”x1-5/16”

Infrared Barriers Infrared emitters are 5mm in diameter Infrared detectors are 5mm in diameter Four (4) infrared barriers that are 2 feet long

10

Page 19:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

o Barriers constructed in IR emitter/detector pairs 11mm apart

o 112 total IR emitter/detector pairs (23 pairs per barrier)

Ball Washer Reservoir able to hold up to one (1) gallon of water Water flow rate at least five (5) times total volume of

wash system Pump weight of less than five (5) pounds Water ripe to retain integrity through one (1) degree per

second Fahrenheit temperature change Power Supply

Able to take in 120V Deliver power at 3.3v, 5v, and 12v

3.0 Research Related to Project Definition3.1 Existing Similar ProjectsBeer Pong uses various pieces of equipment in order to play the game. Through the game’s widespread popularity, the group had discovered many projects similar to their own. A great many of these projects had direct influence on the group’s decisions in creating the DCPPTSS. These already-existing projects all involve modifying the table in some way; most providing a more aesthetically pleasing support structure to enhance the game-playing experience. The following projects have influenced the group in some way. Some had given the group new ways to approach problems, while others had given the group ideas which they implemented in their own design to make their table unique.

3.1.1 Research

Commercially Available Products - The group had pulled significant influence from commercially available tables. These products are generally constructed of wood or aluminum, and fold in either two (2) or four (4) sections, respectively. They measure 8’x2’x27.5” when set up, however when they fold, they become portable and easy to store. See below for an example of an aluminum table (not to scale) in Figure 2.

11

Page 20:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

Figure 2: This is an example of a commercially available aluminum table. This type of table can be folded in four sections along the black vertical lines. The table legs fold up as well. Not to scale; exact shape may vary depending on

manufacturer and material used.

“Homebrew” Projects - So-called “homebrew” projects form the majority of influential designs for the group. The different designs of the existing projects include table enhancements in many different areas. Designs range from simple (home-built tables simply painted with designs) to intricate (lights placed around the table and moving parts).

Aesthetic Lights - One project that features aesthetic lighting comes from West Virginia University. In that project, the table was constructed with two rows of LEDs around the outer edge of the table, LEDs around the triangle where the cups reside, a ring of LEDs around the ball washing areas, and LEDs in the middle of the table in the shape of the school logo. The LEDs around the table react to ambient noise (e.g. music), while the LEDs around the triangles and ball washers chase to create a more interactive and entertaining experience. It can be viewed in action by following this link: http://www.youtube.com/watch?v=GClnXjoaqxQ.

Cup and Liquid Detection - When researching ideas for the project, the group stumbled upon two videos which demonstrate the ability to detect the presence of cups. The first (which can be viewed here: http://www.youtube.com/watch?v=CL1y27ucicY) shows LEDs reacting to the placement of cups by changing colors. The clear circles for the cups and LEDs are arranged in a 10-cup triangular pattern. When all cups are removed, each circle displays a different color. When the first cup is placed, the color it is placed on is selected and all subsequent cups placed will have that same color displayed underneath. The objects that appear in the bottom of the cup are used for detection using a modulated infrared reflectivity sensor (which is referenced by the description of the second video). It can be inferred that this method of sensing does not detect the presence of liquid in the cups. In the second video (viewable here: http://www.youtube.com/watch?v=j4-ZTZNe2eM), the same designer used a

12

Page 21:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

different method for detecting the cup: capacitive sensing. With this method, by detecting the change in capacitance using a circuit underneath the cup area, liquid can be detected. The video demonstrates this ability.

Ball Washer - Many of the existing projects that the group found included methods to wash the ping pong balls used to play Beer Pong. Most, if not all, of the ball washers the group found actively cleaned the balls using water pumps in some form or another. A popular method of cleaning the balls was by the use of a sunken cup where water was pumped in to create a whirlpool effect such that the balls would be washed over the whole of their surfaces. This method can be viewed in the following video: http://www.youtube.com/watch?v=P4l2JB2dj3M. The other method commonly used physically moves the ball from one side of the table to the other, washing it in a jet of water along the way. At the exit, the ball hovers in a small hole, ready to be grabbed. An example of this method of ball washing can be viewed here: http://www.youtube.com/watch?v=JLQ-fgUUfEk. There are three major parts of this system. The first is the length of pipe with two 90-degree bends, next is an air blower to propel the ball down the pipe, and finally is a water pump to create the jet of water that cleans the ball. More detailed pictures of the design can be viewed here: https://picasaweb.google.com/113748248279611171005/BeerPongBallWasher#5475389777272746450.

User Interface - The group has also come across some tables that have a user interface as well, though these tables are rare. In the following video, there are points at which the players can directly interact with the table: http://www.youtube.com/watch?v=d-hrXelzbE8 (University of Colorado Boulder). This table keeps track of score by counting the cups remaining on each side, and displays each number on seven-segment LCDs. It also has buttons on each end of the table that perform different functions: re-racks, random re-racks, and buttons that play sounds. This table also has an electronic keyboard list and transmits to the PC and posts to a Twitter account to track the next-up player list online.

3.1.2 Influence and Implementation

Commercial Available Products - The main influence that the commercially available products had on the group’s project is fairly significant, and may prove to be the greatest challenge the group has to face. The commercial products seem to be quite mobile and easy to store. Parties can happen anywhere, anytime, so the group has decided that the ability to easily transport the DCPPTSS is a highly desired goal. However, the group was unable to use a similar folding technique, or keep the weight of the DCPPTSS down in order to achieve this goal. The idea was to help the DCPPTSS compete in maximizing play time with other lightweight and portable alternatives in a party setting. This was unachievable due to the quantity of wires, placement of various subsystems across the DCPPTSS, and the group needed to use larger (and more) table legs to ensure the structural stability of the table.

13

Page 22:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

Aesthetic Lights - The group had decided to create aesthetic lighting in the form of LEDs around the table in a similar way as the table from West Virginia University was lit. While the group liked the idea of the LEDs around the table reacting to ambient noise (e.g. music), it had been deemed unnecessary for this project and was not used. Aesthetic LEDs were used to light the table where the cups reside in the same fashion as shown in the cup sensing videos.

Cup and Liquid Detection - After reviewing the two options for detecting the presence of cups, the group had decided to use capacitive touch as the method the DCPPTSS used. The group had decided it necessary that the cups not be modified in any way. This allowed the DCPPTSS to handle nearly any type of cup to be detected (and whether or not it contains any liquid). The ability of the DCPPTSS to be used in any sort of party setting is a high priority of the group, and as such, capacitive touch appeared to be the best way to accomplish the task of detecting the cup and the presence of liquid.

Ball Washer - For washing the balls, the group had decided to use the well and whirlpool method. This method saved on both power and cost, as it only required a single water pump (even for two wells). Also, the group had noticed that the ball-washing efforts of every table have only entailed rinsing the ball off. The group, being concerned about sanitation--especially because the balls will come in contact with liquids that will be consumed as well as other surfaces that may not be clean--had decided to disinfect the water used to wash the balls. They did this by including a specific 345 nm ultraviolet light to kill bacteria in the wash water.

User Interface - The group had decided to include a user interface similar to that in the University of Colorado video, but with a different take. It was deemed by the group early on to be outside the scope of the project to include wireless integration for score and team tracking. The project did, however, have an individual display to track scores as well as include an interface for requesting re-racks and marking other specific situations that the table will not be able to detect (forfeits, wildly missed shots, etc). The display was personalized to each team, meaning it tracks re-racks left, team number, and performs other functions such as skipping a turn and forfeiting a game in conjunction with the buttons provided. The table was also going feature a seven-segment LCD like the University of Colorado table. However, it would have been used to keep score, but to keep track of the team that plays next. The group determined that the personalized display would perform this function much better, and it also required less modification of the table surface itself.

Ball/Target Hit Detection - Something conspicuously absent from every existing project is the ability to detect that a ball has landed in a target cup. Since this had not been done before, the group had decided it important to detect a successful throw. Most ideas for detecting the presence of a ball in a cup have been considered implausible to use as they nearly all require modification of the balls or cups, which the group wished to avoid in the project to allow the DCPPTSS to

14

Page 23:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

be used by anyone with any type of balls and/or cups. After discussing a few different methods, the group settled on a discretizing laser array system consisting of laser emitters and detectors over the play surface of the table. This created a coordinate grid of red laser lights around the cups, and when a ball passes through the grid at a location over an existing cup, the DCPPTSS knows that the ball landed in a cup and respond accordingly.

3.2 Relevant Technologies Research

3.2.1 Central Controller Options

The Digital Competitive Precision Projectile Table Support Structure is comprised of many different systems working together to provide the users with an interactive table that allows them to play a fun game of beer pong. The role of the central controller in the Digital Competitive Precision Projectile Table Support Structure is to be the integrator of majority of the sub-systems. The different processors considered to be the central controller were the Stellaris EKS-LM3S8962, the OKI ML674000, the ATMEL AT91SAM, and the MSP430G2553. The central controller chosen had to be able to handle a number of functions. The functions of the central controller are:

Communicate with laser grid array ball detection sub-system Communicate with capacitive touch sub-system Control movement of table LEDs Keep track of the score Keep track of the number of cups remaining for each player Keep track of the number of throws remaining per round per person Display information to display monitor

o Scoreo Current player turn indicatoro Throws remaining for current playero Cup arrangement for each playero Winner/Loser

Stellaris EKS-LM3S8962 - The Stellaris EKS-LM3S8962 ARM processor was considered as the central controller for the Digital Competitive Precision Projectile Table Support Structure for a number of reasons. The Stellaris EKS-LM3S8962 ARM processor’s 32-bit computing would help with the data being transferred to and from the sub-systems it would have to communicate with if it were chosen as the central controller. Another feature of the Stellaris EKS-LM3S8962 that would have aided the Digital Competitive Precision Projectile Table Support Structure is its battery-packed Hibernation module that efficiently powers down the Stellaris EKS-LM3S8962 to a low-power state during extended periods of inactivity. This is useful because if for any reason the users stop playing beer pong without turning off the Digital Competitive Precision Projectile

15

Page 24:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

Table Support Structure the Stellaris EKS-LM3S8962 would limit its power consumption.

In addition, the Stellaris EKS-LM3S8962 has non-volatile memory so all data would remain intact once it returns form Hibernation. The Stellaris EKS-LM3S8962 ARM processor also has 256 KB single-cycle flash internal memory. This would be useful to the Digital Competitive Precision Projectile Table Support Structure because it is able to track different events that will occur during the game of beer pong and coordinate with the various sub-systems. The Stellaris EKS-LM3S8962 ARM processor also has various communication options. The communication options the Stellaris EKS-LM3S8962 is capable of are Universal Asynchronous Receivers/Transmitters (UART), Synchronous Serial Interface (SSI), and Inter-Integrated Circuit (I2C). Having various communications allows the Stellaris EKS-LM3S8962 ARM processor to be a viable option as the central controller.

OKI ML674000 - The OKI ML674000 ARM processor was considered as the central controller for the Digital Competitive Precision Projectile Table Support Structure for a number of reasons. The OKI ML674000 ARM processor’s 32-bit data processing would be used when it comes to processing data received which is important when it comes to communicating with the laser grid array ball detection sub-system and the capacitive touch sub-system. The OKI ML674000 ARM processor has an internal memory of 8 KB which would be needed if it were selected as the central controller for the Digital Competitive Precision Projectile Table Support Structure. This because of the data that will need to be stored that is to be transferred to and from the sub-systems as well as information that needs to be displayed onto the display monitor. The OKI ML674000 ARM processor has only one communication method which is the Universal Asynchronous Receivers/Transmitters (UART). The OKI ML674000 would only work as the central controller for the Digital Competitive Precision Projectile Table Support Structure if the communication selected for the project is Universal Asynchronous Receivers/Transmitters (UART). As UART wasn't the communication method used for the Digital Competitive Precision Projectile Table Support Structure then the OKI ML674000 ARM processor would be of no use.

ATMEL AT91SAM - The ATMEL AT91SAM ARM processor was considered as the central controller for the Digital Competitive Precision Projectile Table Support Structure for a number of reasons. The ATMEL AT91SAM ARM processor has a 32-bit data processor would be used when it comes to processing the data received which is important when it comes to communicating with the laser grid array ball detection sub-system and the capacitive touch sub-system of the Digital Competitive Precision Projectile Table Support Structure. The ATMEL AT91SAM ARM processor also has 256 KB flash internal memory which is also needed as the central controller for the Digital Competitive Precision Projectile Table Support Structure. It is important as the central

16

Page 25:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

controller due to the fact that data would need to be stored onto the ATMEL AT91SAM ARM processor.

Data would be transferred to and from the ATMEL AT91SAM ARM processor when it communicates with the laser grid array ball detection sub-system and the capacitive touch sub-system. The ATMEL AT91SAM ARM processor also has a variety of communication options. This made the ATMEL AT91SAM a viable option for the Digital Competitive Precision Projectile Table Support Structure because it is able to communicate with a variety of devices for this project. The communication options available with the ATMEL AT91SAM ARM processor are Universal Asynchronous Receivers/Transmitters (UART), Serial Synchronous Controller (SSC), and Serial Peripheral Interface (SPI).

Communication Options -The communication options that the considered central control processors possess are the Universal Asynchronous Receivers/Transmitters (UART), Serial Synchronous Controller (SSC), Serial Peripheral Interface (SPI), Synchronous Serial Interface (SSI), and Inter-Integrated Circuit (I2C). Using communication options gives the central control processor options of how data should be transferred and when it should be transferred. There are also benefits of using a communication system. Communication systems can help with limiting pin usage. This is because with communication options multiple devices can transfer data to and from by using a single bus. Due to this most communication systems uses a bus arbitration to make sure that multiple devices do not try to send data at the same time

Universal Asynchronous Receiver/Transmitter is a communication system that is hardware that translates data between serial and parallel forms. It is asynchronous hence it allows data transmission to occur without the sender having to send a clock signal to a receiver. The transmitter and receiver must agree on timing parameters in advance and special bits must also be added to each word to synchronize the sending and receiving units. The Stellaris EKS-LM3S8962 ARM processor uses Universal Asynchronous Receiver/Transmitter as one of its communication methods. The Universal Asynchronous Receiver/Transmitter of the Stellaris EKS-LM3S8962 features:

Two fully programmable UARTs Separate transmit (TX) and receive (RX) FIFOs to reduce CPU interrupt

service loading Programmable baud-rate generator allowing speeds up to 3.125 Mbps Fully programmable serial interface characteristics

These features are important when it comes to the functions of the sub-systems of the Digital Competitive Precision Projectile Table Support Structure. The two fully programmable UARTs allow the Stellaris EKS-LM3S8962 ARM processor to communicate with multiple systems without having to worry about congestion of data on a single bus. The separate transmit and receive FIFOs (first in first out) reduces the CPU interrupt service loading because it does not have to worry

17

Page 26:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

about switching a single line back and forth from transmitting and receiving. The programmable baud-rate generator is important with the communication of data due to the fact the baud-rate is simply the number of symbols per second. Therefore the baud-rate generator determines how much data is transferred every second. The fully programmable serial interface characteristics are important to the Digital Competitive Precision Projectile Table Support sub-systems because you can determine how many data bits to use 5, 6, 7, or 8. Figure 3 is the module block diagram the Universal Asynchronous Receiver/Transmitter for the Stellaris EKS-LM3S8962 ARM processor. It shows where the connections to the sub-systems are made.

Figure 3: Stellaris UART Module Block Diagram

The ATMEL AT91SAM ARM processor also utilizes the Universal Asynchronous Receiver/Transmitter (UART) as one of its communication methods. The Universal Asynchronous Receiver/Transmitter of the ATMEL AT91SAM ARM processor that would communicate with the sub-systems of the Digital Competitive Precision Projectile Table Support Structure features:

A two-pin UARTo Independent receiver (URXD) and transmitter (UTXD)o Common programmable baud rate generator

The feature of a two-pin UART is important when it comes to communicating with the Digital Competitive Precision Projectile Table Support Structure’s sub-systems. It’s important because the two-pin UART has an independent receiver and transmitter. This is important because it reduces the CPU interrupt service loading from having to switch back and forth from transmitting and receiving.

18

Page 27:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

Figure 4 shows where the external devices will connect with the ATMEL AT91SAM to transfer data to and from it.

Figure 4: ATMEL AT91SAM UART Functional Block Diagram

The OKI ML674000 ARM processor utilizes the Universal Asynchronous Receiver/Transmitter (UART) as its only main method of communication. The Universal Asynchronous Receiver/Transmitter communication system of the OKI ML674000 ARM processor would be used to communicate with the Digital Competitive Precision Projectile Table Support Structure’s sub-systems. Features of the OKI ML674000 ARM processor’s UART are:

16-byte queues for both transmitting (TSR) and receiving (RSR) Programmable serial interface

o Choice of 5, 6, 7, or 8 bits per character

These features of OKI ML674000 ARM processor’s UART are important for the Digital Competitive Precision Projectile Table Support Structure for a few reasons. The 16-byte queues for both transmitting and receiving reduces the CPU interrupt service loading from having to switch back and forth from transmitting and receiving. The programmable serial interface is important because it allows whatever system communicating with the OKI ML674000 ARM processor to transmit data of a variable length. The following diagram shows a block diagram of the transmit and receive pins for the OKI ML674000 ARM processor in which another device would connect to communicate data.

19

Page 28:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

Figure 5: OKI ML674000 UART Functional Block Diagram

Serial Peripheral Interface is another communication option used by processors to communicate serially with other devices using a master slave mode where the master processor will initiate the data frame. This communication option would be useful in working with the sub-systems of the Digital Competitive Precision Projectile Table Support Structure due to the master slave mode. During a data transfer, one SPI system acts as the “master” which controls the data flow, while the other devices act as “slaves” which have data shifted into and out by the master. The central control is required to interact with the sub-systems in such a fashion thus making the considered central control that uses this communication system a viable option. The only central controller option that utilizes the Serial Peripheral Interface is the ATMEL AT91SAM ARM processor. Some of the features for the ATMEL AT91SAM ARM processor that are related to the Digital Competitive Precision Projectile Table Support Structure are:

Supports Communication with Serial External Deviceo Four Chip Selects with External Decoder Support Allow

Communication with Up to 15 peripherals Master or Slave Peripheral Bus Interface

These features of the ATMEL AT91SAM ARM processor’s SPI are important when it comes to the Digital Competitive Precision Projectile Table Support Structure. It supports communication with serial external devices, which allows

20

Page 29:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

communication not only the Digital Competitive Precision Projectile Table Support Structure’s laser grid array ball detection and capacitive touch sub-systems, but it also allows the communication of any other system that may be added. The master or slave serial peripheral bus interface is also important because it allows an order of importance. Being the central control option the master mode would be primarily used. The following diagram is the ATMEL AT91SAM SPI block diagram which shows where an external device would connect for communication. The serial clock (SPCK) is the control line driven by the master and regulates the flow of data bits. The Master In Slave Out (MISO) is the data line that supplies the output data from a slave to the input of the master. The Master Out Slave In (MOSI) is the data line that supplies the output data from the master into the input(s) of the slave(s). The Slave Select (NSS) is the control line that allows slaves to be turned on and off by hardware.

Synchronous Serial Interface (SSI) is a master or slave interface for synchronous serial communication with peripheral devices. It is another communication option used due to its master or slave modes. This is helpful to the Device Competitive Precision Projectile Table Support Structure due to the fact that the central control needs to be able to communicate with different sub-systems and process that data that it receives as well send out data to the slaves. The Stellaris EKS-LM3S8962 ARM processor is the only central control option that uses the synchronous serial interface as a communication option. There are features of the Stellaris EKS-LM3S8962 that are useful for the Digital Competitive Precision Projectile Table Support Structure. If selected as the central control, the Stellaris EKS-LM3S8962 would have been given the tasks of communicating with sub-systems, such as the laser grid array ball detection sub-system and the capacitive touch sub-system. It would also control the LED location and outputting information to the display monitor. Features of the Stellaris EKS-LM3S8962 ARM processor that will help it with fulfilling the tasks as the central control are:

Master or slave operation Programmable clock bit rate Separate transmit and receive FIFOs

o 16 bits wideo 8 locations deep

Programmable data frame size Internal loopback test mode

21

Page 30:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

Figure 6: ATMEL AT91SAM SPI Block Diagram

These features of the Stellaris EKS-LM3S8962 ARM processor are important to the Digital Competitive Precision Projectile Table Support Structure for a few reasons. The master or slave operation gives it the ability to choose whether the processor has any control over other devices. With the purpose of being the central control, the Stellaris EKS-LM3S8962 ARM processor would be used in the master operation which allows it control of the Digital Competitive Precision Projectile Table Support Structure’s sub-systems. The programmable clock bit rate, baud rate, allows the Stellaris EKS-LM3S8962 ARM processor the ability to set how many bits will be sent each second. This is of great importance because it allows the communication between the Stellaris EKS-LM3S8962 ARM processor and other devices to maximize the amount of data sent between them. The separate transmit and receive FIFOs (First In First Out) is important because it allows 8 locations of 16 bits for each the transmitter and receiver to be stored before the Stellaris EKS-LM3S8962 services the interrupt. Programmable data frame size is important for the Stellaris EKS-LM3S8962 ARM processor because the frame size of the data can be programmed to range from 4-bits to 16-bits. Probably one of the most important features of the Stellaris EKS-LM3S8962 ARM processor SSI communication option is the internal loopback test mode feature. The internal loopback test mode is an important feature of the Stellaris EKS-LM3S8962 SSI for the Device Competitive Precision Projectile Table Support Structure because it allows for diagnostic/debug testing. This would come in handy when it comes to testing the communication of data between the Stellaris EKS-LM3S8962 and other devices such as the laser grid array ball detection sub-system, the capacitive touch sub-system, the LED sub-system, and also when it comes to outputting data to the display monitor. The following diagram displays the SSI transmitter (SSITx), SSI receiver (SSIRX), SSI clock (SSICLK), and the SSI fully source synchronous (SSIFss). These are connected

22

Page 31:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

with an external device and are used for transmitting and receiving data synchronously.

Figure 7: Stellaris SSI Module Block Diagram

Inter-Integrated Circuit (I2C) is a serial protocol that is capable of connecting multiple devices in a master-slave relationship. The Inter-Integrated Circuit bus uses only two signals, being signal data (SDA) and signal clock (SCL), which are named as I2CSDA and I2CSCL, respectively. The only processor considered to handle the tasks of the Digital Competitive Precision Projectile Table Support Structure using I2C was the Stellaris EKS-LM3S8962 ARM processor. The features of the Stellaris EKS-LM3S8962 ARM I2C communication method that would be essential to the Digital Competitive Precision Projectile Table Support Structure are:

Devices on the I2C bus can be designated as either a master or a slaveo Supports both sending and receiving data as either a master or a

slaveo Supports simultaneous master and slave operation

Four I2C modeso Master transmito Master receiveo Slave transmito Slave receive

Master and slave interrupt generationo Master generates interrupts when a transmit or receive operation

completes (or aborts due to an error)

23

Page 32:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

o Slave generates interrupts when data has been sent or requested by a master

Master with arbitration and clock synchronization and 7-bit addressing mode

These four features of I2C for the Stellaris EKS-LM3S8962 ARM processor are very important when it comes to being the central controller for the Digital Competitive Precision Projectile Table Support Structure. Due to a single wire for data transfer, each device on the I2C bus can be designated as either a master or a slave. This is important because data from multiple devices would be transmitted and each transmission would be designated as a data transmission to or from and master or a data transmission to or from a slave. The different I2C modes are also important to the Digital Competitive Precision Projectile Table Support Structure due to the fact that the Stellaris EKS-LM3S8962 ARM processor would be used as the central controller. This means that it would only need to use the master transmit and the master receive modes. The master and slave interrupt generation is one of the essential features that would be used for the Digital Competitive Precision Projectile Table Support Structure because the central controller communicates data to and from other devices based on an event occurring causing an interrupt. The master arbitration and clock synchronization would allow the master to control all data being received and transmitted by it with a certain priority and synchronizing data to be transmitted at the same time. The 7-bit addressing mode allows the Stellaris EKS-LM3S8962 ARM processor to store each device as a 7-bit address within its memory.

Figure 8: Stellaris I2C Block Diagram

Choice of central control - Each processor that was considered as the central controller for the Digital Competitive Precision Projectile Table Support Structure each had something to offer. The OKI ML674000 ARM processor had its 16-byte queues for its transmitting and receiving which reduces CPU interrupt service loading. The ATMEL AT91SAM ARM processor had multiple communication methods it could use which made it flexible to choose devices that also work with those communication methods. The Stellaris EKS-LM3S8962 ARM processor also has multiple communication methods. Although initially the Stellaris EKS-

24

Page 33:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

LM3S8962 ARM processor was selected to play the role of the central control unit, through difficulty programming and its non-uniform style of I2C communication the MSP430G2553 microcontroller was later chosen to handle the tasks of the central control unit. The MSP430G2553 microcontroller was chosen for a few reasons. Choosing the MSP430G2553 microcontroller as the central control unit of the Digital Competitive Precision Projectile Table Support Structure became a great choice due to the fact that it kept programming I2C communication simpler for all microcontrollers that were used, it was obtained at low cost, there is previous experience in working with the microcontroller, its low power consumption, as well as its low interrupt latency which plays a huge role in this project.

3.2.2 MCU OptionsThe Digital Competitive Precision Projectile Table Support Structure or DCPPTSS needed several microcontrollers to handle the various systems which are used to distribute different aspects of the game and finally integrated these systems using another microcontroller. The systems the Digital Competitive Precision Projectile Table Support Structure uses are a ball detection system using laser emitter/detector pairs, as well as capacitive touch systems which determine cup presence/fullness. These systems each use a single microcontroller. These systems are then integrated with a central microcontroller that has to handle data being communicated to and from it and the other microcontrollers. This central processor is also responsible for communicating with the controller of the system used to display to the users on a monitor the score and the location of the cups remaining on the table. The central processor also controls the bit pattern of the aesthetic LEDs around the table.

Three microcontrollers were considered in terms of dealing with the 4 sub-systems, the light barrier system for ball detection and two capacitive touch systems for cup detection. The three microcontrollers considered for handling the sub-systems were the MSP EXP-430G2, the Atmel AT32UC3A0128, and the Microchip PIC24F04KA201.

The Microchip PIC24F04KA201, the MSP EXP-430G2, and the Atmel AT32UC3A0128 were all considered due to their low power consumption, their various power modes, their ability for the use of capacitive touch sensing and the different options they provide to communicate with another system for input and output purposes. It is imperative that the microcontroller used has the ability of capacitive touch sensing because that is a major feature in the Digital Competitive Precision Projectile Table Support Structure. Another important aspect which all of these microcontrollers have is the various power modes.

The various power modes are important because of the turn-based style of Beer Pong, therefore during the entire course of the game each side will be in use for only half the duration of the time. To combat the obvious waste of power that would occur by leaving the microcontrollers, the SLEEP or DEEP SLEEP mode

25

Page 34:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

are used to limit the consumption of power. Another major component of consideration of these microcontrollers was the different ways they would be able to communicate data for the purpose of input and output with another microcontroller. The various ways of communication can be direct connection with the input/output port of the microcontroller, Universal Asynchronous Receiver Transmitter (UART), Synchronous Serial Controller (SSC), Serial Peripheral Interface (SPI), or Inter-Integrated Circuit (I2C).

Communication Options - The most basic way to communicate data between two or more systems is to directly connect the port of one microcontroller to another microcontroller. This design makes it easy to know where each peripheral is connected to a given microcontroller. The connection process is easy, but the question of efficiency comes to mind. Using more pins may lead to more errors when it comes to synchronizing data. For that reason direct connection for data transfer was not used for the microcontroller that was selected.

Universal Asynchronous Receiver/Transmitter is a communication system that is hardware that translates data between serial and parallel forms. It is asynchronous hence it allows data transmission to occur without the sender having to send a clock signal to a receiver. The transmitter and receiver must agree on timing parameters in advance and specials bits must also be added to each word to synchronize the sending and receiving units. Microchip PIC24F04KA201 uses the Universal Asynchronous Receiver/Transmitter to transmit data. The features of the Universal Asynchronous Receiver/Transmitter communication method that are useful for the Digital Competitive Precision Projectile Table Support Structure are:

Independent transmit and receive buffer registers Independent interrupt capability for receive and transmit Separate transmit and receive buffer registers

These features are important for the functions of the Digital Competitive Precision Projectile Table Support Structure. The independent transmit and receive buffer registers which reduces the CPU service interrupt due to the fact that it does not have to switch back and forth to and from transmitting and receiving. The independent interrupt capability for the receive and transmit is important because the receive register will always wait for incoming data while the transmit register is always waiting to transmit. Figure 9 shows the connection pins for a MSP430 Universal Asynchronous Receiver/Transmitter communication system.

26

Page 35:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

Figure 9: MSP430 USART Block Diagram

Synchronous Serial Communication- is the process of sending data one bit at a time, in order, where several bits are sent as a whole. The Atmel AT32UC3A0128 microcontroller unit is the only microcontroller that uses the Synchronous Serial Communication method. The features of the synchronous serial communication that would be useful for the Digital Competitive Precision Projectile Table Support Structure are:

Receiver and transmitter can be programmed to start automatically or on detection of different events on the frame sync signal

Receiver and transmitter include a data signal, a clock signal and a frame synchronization signal

These two features of the Synchronous Serial Controller communication method are important to the functions of the Digital Competitive Precision Projectile Table Support Structure. The receiver and transmitter being programmed to start automatically on detection of different events is of great importance because when the ball detection system detects an object enter its field is when the transmitting to the central control unit should begin. The receiver and transmitter including a data signal, a clock signal and a frame synchronization signal are important to the Digital Competitive Precision Projectile Table Support Structure due to the fact that all data being transferred can all be sent at the same time using the synchronization signal.

27

Page 36:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

Figure 10: Atmel AT32UC3A0128 SSC Block Diagram

Serial Peripheral Interface (SPI) is another communication option used by microcontroller unit to communicate serially with other devices using a master-slave mode where the master processor will initiate the data frame. This communication option would be useful in working with the sub-systems of the Digital Competitive Precision Projectile Table Support Structure due to the master-slave mode. During a data transfer, one SPI system acts as the “master” which controls the data flow, while the other devices act as “slaves” which have data shifted into and out by the master. The microcontroller unit is required to interact with the central control in such a fashion thus making the considered microcontroller unit that uses this communication system a viable option. Features of using Serial Peripheral Interface as a communication option for the Digital Competitive Precision Projectile Table Support Structure are:

Master or slave serial peripheral bus interfaceo Programmable transfer delays between consecutive transfers and

between clock and datao Selectable mode fault detection

Supports communication with serial external deviceso Serial memories, such as DataFlash and 3-wire EEPROMso Four chip selects with external decoder support allow

communication with up to 15 peripherals

The features of the Serial Peripheral Interface (SPI) are important to the Digital Competitive Precision Projectile Table Support Structure. The master or slave serial peripheral bus interface is important due to the microcontroller used must be in a slave mode to transfer and receive data from the central control unit. The Serial Peripheral Interface (SPI) also supports communication with serial external devices. This feature allows the microcontroller to communicate with up to 15

28

Page 37:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

external devices due to its four chip selects with its external decoder. Figure 11 shows the master clock and the connection pins for the external devices used for the Digital Competitive Precision Projectile Table Support Structure.

Figure 11: Microchip PIC SPI Block Diagram

Inter-Integrated Circuit (I2C) is a serial protocol that is capable of connecting multiple devices in a master-slave relationship. The Inter-Integrated Circuit bus uses only two signals, being signal data (SDA) and signal clock (SCL). Features of the Inter-Integrated Circuit (I2C) that are useful for the Digital Competitive Precision Projectile Table Support Structure are:

Independent master and slave logic 7-bit and 10-bit device addresses

The features of Inter-Integrated Circuit (I2C) are important for the functions of the Digital Competitive Precision Projectile Table Support Structure. The independent master and slave logic is important due to the fact that the central controller will be used in slave mode communicating with the central control unit. The 7-bit and 10-bit device addresses allows an addressing system for the external devices if the microcontroller is connected to multiple devices. Figure 12 shows the components in which the microcontroller will connect to an external device using the Inter-Integrated Circuit (I2C) communication method. Inter-Integrated Circuit (I2C) uses a single data line and clock to send and receive data to and from the microcontroller.

29

Page 38:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

Figure 12: MSP430 I2C Block Diagram

Choice of MCU - Each microcontroller considered provides features that would help in designing the sub-systems of the Digital Competitive Precision Projectile Table Support Structure. The microcontroller that was selected needed to be capacitive touch capable and use a communication system that supports Inter-Integrated Circuit (I2C). The microcontroller selected for the Digital Competitive Precision Projectile Table Support Structure was the MSP430 microcontroller. It was chosen because it uses I2C, it’s inexpensive to purchase, and the group has previous experience working with the MSP430 microcontroller.

3.2.3 User Interface OptionsThe user interface is an important part of the DCPPTSS. All users (i.e. players) interact with the DCPPTSS through the user interface in one way or another. In fact, the main way in which the players interact with the table and game is through the balls and cups. The group found that it was important to explore different options for the balls and cups that would work properly with the game as well as the other systems that are part of the table. The rest of the user interface options are in the form of digital systems that control different functions that the table performs. It was important for the group to explore different options for controlling these functions because the table is unable to track every single condition that may occur through the course of a game of Beer Pong.

Balls - The two main interaction points the players have with the DCPPTSS are the balls and the cups. While the balls and cups may not be immediately included with the user interface, it was important to consider the options for each of these, as they each may have had a bearing on the way the game is played and how

30

Page 39:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

the underlying digital systems were affected. While seemingly simple, the group determined that the choice of balls and cups was an important one that could have far-reaching consequences in the system.

In order to choose the proper ping pong ball to use in conjunction with the DCPPTSS, the group had to research into the types of balls used for table tennis as a sport. Through this, they found many different types of balls. Each ping pong ball used for tournament play in table tennis (determined by the International Table Tennis Federation) is either white or orange in color. Ping pong ball sizes also have a significant impact on the table tennis game. Prior to 2000, 38mm balls were officially used for table tennis, however the ITTF replaced them with 40mm balls because the balls move slower and do not spin as much. More recently, 44mm balls have come into favor by some players because they slow the game down further. Ping pong balls also vary in quality. There are three ratings which are applied to each ball: 1-, 2-, and 3-star ratings. Each of these ratings corresponds to the relative quality of the ball, and is printed on each ball. 3-star rated balls are the only approved balls by the ITTF (http://www.ittf.com/_front_page/ittf1.asp?category=balls) as they are the best constructed and provide the most consistent experience (namely bounce and spin). All balls must be exactly 2.7 grams according to the ITTF.

Since they are the most common size, the group had chosen 40mm 3-star balls to use with the DCPPTSS. While the star rating is not as important as the size for the purposes of the project, it allowed for consistent testing of the finished project. The size is the most important quality that the group needed to choose in a ball. The choice in size determined the maximum gap between the laser gridlines created by the emitters/detectors. If the gap between the gridlines of the laser emitters/detectors is larger than the diameter of the ping pong ball, then there is a chance the ball will not be detected when passing through the laser grid. The choice of a 40mm ball allowed the group to space the laser emitters/detectors further apart than would be possible with a 38mm ball. This also allowed the group to save money on laser emitters and detectors, as there were less laser emitters and detectors required to cover the entire play area.

Cups - Many different sizes and shapes of cups were considered by the group for use with the DCPPTSS. However, since most games of beer pong are played with cheap, plastic party cups (usually Solo brand), the group looked at a small subset of cups. The group had found through firsthand experience that the cheapest cups are the most prolific, as party-throwers try to keep costs down. The biggest factors that the group looked for in cups for use with the DCPPTSS were the base diameter and the rim diameter. Color was also somewhat of a factor considered by the group for easy recognition, although it was not necessary to choose a specific color. The size and shape of the cups to be used were quickly narrowed down to two types of cups: the official cup used in accordance with the World Series of Beer Pong rules, and standard Solo part cups found at many local stores and parties. The WSOBP cups have the following measurements: top diameter of 3-5/8”, height of 4-5/8”, and base

31

Page 40:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

diameter of 2-1/4”. The Solo cups have the following measurements: top diameter of 3.75”, height of 3.75”, and base diameter of 2.5”. Both types of cup will hold 16oz. of fluid.

The group had decided to use Solo party cups to base the design on. Interestingly, the base of a Solo cup is the exact size needed to circumscribe each capacitive touch sensor. This allowed for consistent readings for detecting the level of liquid in the cup while on the sensor, since there is no chance that the position of the cup on the sensor would affect the capacitance. Solo cups are also much easier to come by because they can be purchased at nearly any store, while the official WSOBP must be purchased online at a premium.

Display - The group had decided that they would like to include more digital elements as part of the user interface for the DCPPTSS than those of a typical electronic beer pong table. This meant they would have to display information for the players throughout the game, as well as provide the players with the means to control certain aspects of the game such reracks and forfeiting.

The low-tech, no-display option was the first method considered by the group. In using this method, the group would save money, effort, and time spent constructing and testing a display system. It offered advantages in power because it would use much less, as well as required less resources from the MSP430s. However, without an electronic display, the burden is on the players to remember certain information that the table can easily track.

The group also considered using LEDs to display pertinent information to each team. This option compromised with the low-tech option and allowed the table to track things such as reracks and cups left, while still maintaining a relatively low price and power consumption. LEDs would have been used to track the currently active team, cups left, and reracks left. It would also have been able to display a graphical representation of the shape of the cups left on the opposing team’s side. Buttons would have been required to cover each individual special case function (Miss, Forfeit, Rerack, Skip turn, etc) for each side.

The third and final option considered by the group was the use of two simple LCD display modules for each team. With each display, the group would have been able to independently update each team’s information, as well as display different menus for different stages of the game. This would have potentially allowed a team to specify exactly what shape the cups will be arranged in during a rerack, as well as offered confirmations for other functions such as forfeits and turn skips. Buttons required for this method would have been limited to just three for each module: two for navigation and one for selection. An interactive menu needed to be programmed to use all the functions; however, an internal team queue could also be maintained. This option required the most programming, power, and testing, however the benefits far outweighed those of the other methods, and the group had decided to use this method to display information to each team. However, during construction of the DCPPTSS, the group decided to

32

Page 41:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

use a single display and control module for both teams centrally located on the table to curb cheating, at the expense of more programming.

Since the group had decided to use the digital LCD display method, they needed to choose two important parts to use for the DCPPTSS display subsystem: the type of LCD display and the type of navigation buttons to use. Also, a method for determining next up and other team tracking features was needed to be implemented. Buttons are covered below.

For the display itself, the group needed to choose something that was large enough for the players to see easily, yet small enough that it does not interfere with the playing surface of the DCPPTSS. Also, a back-lit display was preferred because the game may be played in dark or near-dark lighting conditions. The group considered three different types of LCD displays: 8 character by 2 line, 16 character by 2 line, and 20 character by 4 line.

The 8x2 display was determined to be too small for the amount of information that needed to be displayed to the teams, without scrolling. Scrolling could be used, however, the group decided it was better to make sure the teams never had to wait to see information they could require immediately.

The 20x4 display was determined to be too big to use for the display. In some cases, space would have been too little utilized on the screen. However, in some cases it would have become too cluttered by displayed menus. Also, 20x4 LCD displays with a backlight are significantly more expensive than 8x2 and 16x2 displays.

The 16x2 display seemed to be the happy medium that the group was looking for. With a 16x2 display, they were able to display for each team any pertinent information they may find necessary without the need for scrolling as well as display a separate menu that will help communicate with the table in the case of a Miss, Rerack, or when a team wishes to Forfeit or Skip their turn. 16x2 LCDs are also relatively cheap, making them the perfect choice.

Once the type of display was decided, the group needed to choose between serial and parallel interfaces for the 16x2 LCDs. Most 16x2 LCDs are configured for parallel use and are therefore inexpensive. However, a parallel 16x2 LCD would require approximately 11 I/O pins each on a given microcontroller. This was determined to be unrealistic to use. The group found that serially interfaced 16x2 LCDs would only require a fraction of the I/O pins per display to use. The group used the I2C communication protocol. This allowed the group to interface more subsystems to the MSP430s because the same two buses that are used for I2C can be used by multiple devices. The group decided to interface the 16x2 LCD with the MSP430 that drives the user interface for displaying information for the current game. Also, the display was driven serially using the RS232 protocol, while communication was handled by I2C with other systems.

33

Page 42:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

For determining the next-up players/teams, a simple solution was needed due to the size and ambition of other parts of the DCPPTSS. The group needed a way to display the next up teams while not interfering with the players currently playing. Since the 16x2 LCDs were to be used for each individual team, the group did not want to use those to display the next up team (at least exclusively). A third 16x2 LCD would have be both too expensive and require extra programming overhead, just for a simple display. In order to choose the next-up team, the group decided against having any kind of input because they wanted to make sure the game could be played without interference. Any sort of movement on the side of the table could be distracting, and in the extreme case, the table could be shaken and cause a cup to spill or a player to miss. Having no input would also mean the system for tracking the team list would be less complex.

With all of these limitations in mind, the group had decided to use an I2C implementation of a seven-segment display. They decided to use one multi-digit display rather than multiple single-digit displays in order to lower the number of pins necessary to interface and power the display. They chose a 4-digit 7-segment display that will be mounted centrally on the DCPPTSS.

The two most significant digits were to be used to display the team number of the currently playing team on that side of the table, and the two least significant digits were to be used to display the team number of the currently playing team on the other side of the table. In order to show the team number for the team that is next in the queue, the seven-segment LCD would have slowly flashed between the currently playing teams and the next up team. However, since the group decided to use only one user interface module with one LCD display, they decided that a dedicated display for the currently playing teams was unnecessary. Instead, they simply updated the user interface code to display the required information.

Digital Input (Buttons) - In order to control the user interface, the players needed some form of digital input. The group determined that this form of input should be intuitive so the players have an easy time operating the menu(s) while not having to think too hard or guess at the particular functions of each button. The group decided that using buttons for digital inputs would make menu navigation easy. Only three buttons were necessary: next item, previous item, and select/menu.

The other method the group considered controlled each function of the table by a dedicated button for each function was determined to be too problematic: there would have been no confirmation and thus buttons pressed accidentally could have an adverse effect on the game. If there was a validation for an input method included, it would have been too unintuitive by a player (for example, pressing a button twice to confirm a selection), and would not completely solve the problem of an accidental button press.

The group had discussed a few different options for the navigational buttons. Throw switches were considered briefly, but could not serve the function of

34

Page 43:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

navigating a simple menu well. Momentary switches were determined to be the best type of input. There were many different types of momentary switches that could be used, however it was decided that they needed to be fairly large to make it easy for a player to use and allowed the possibility for the button’s function to be displayed on the button itself.

Arcade game buttons seemed to be the most accessible and best suited to this purpose. There are many different types of arcade buttons to choose from, but each needed to be the same size and type. The group perused the chart given at http://www.slagcoin.com/joystick/attributes_brands.html#BUTTON_CHART to determine the proper button to use. They had decided to use six Sanwa OBSF-30 buttons for navigation. However, only three were needed.

3.2.4 Aesthetic LED ArrayThe game table was referred to in 3 regions. The area in which the laser array and capacitive sensors are located are regions 1 and 2. The area in between the two regions was known as region 0. The Regions are illustrated below in Figure 13. Region 1 and Region 2 both have LED diodes running around the perimeter of the regions. The four animations that are able to be selected are, Default, Team 1 encircle, Team 2 encircle, and Halt flash. The default sequence run when a game is not in play. The default animation sequence runs in the following way: Region 1 and Region 2 and Region 0.  During the default sequence, both Region 1 and Region 2 run the same animation pattern at the same time. The Team 1 encircle sequence runs inside of Region 1, Region 2, and Region 0. Team 1 encircle sequence had diodes actively powering on an off continuously until the input of the animation control lines has changed. The diodes’ presumed animation rotates counter-clockwise. The Team 2 encircle sequence runs inside of the following: Region 1, Region 2, and Region 0. The Team 2 encircle sequence actively powers on an off consecutively continuously until the input of the animation control lines are changed. The diodes’ presumed animation rotates counter-clockwise. Both the Team 1 encircle sequence and the Team 2 encircle sequence never operate at the same time. An animation example is shown in Figure 14. These sequences are a visual effect to distinguish which team is currently up for the offensive phase of their turn.

The table was designed with the LED pattern existing around the perimeter of Region 1 and Region 2. Each LED was spaced evenly throughout the perimeter. The LEDs were built into a housing that existed under the table but was still visible through the acrylic top surface.  The housing diagram is shown in Figure 15. The housing was designed so that the housing is integrated into the table from underneath the table. The housing section contains all the LED diodes for the entire table and regions. There are a total of 360 diodes in the housing section. An equal number of 120 LEDs in each region.

35

Page 44:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

Figure 13: Region Segregation Figure 14: Animation Illustration Illustration

Figure 15: LED Placement Illustration

The options for designing the system were logic, and programmable. A logic based design only requires a power and input signal to run. All of the switching and animation is created through mealy-state-machine outputs. This system would consist of a clock and state logic. The entire lighting and animation system was designed with the convention that follows:

1=true=on=+5v

0=false=o

36

Page 45:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

Each animation sequence is used at different times during the game. The Team 1 encircle and Team 2 encircle animation sequences are used to indicate what team is currently on the offensive. Team 1 encircle animation sequence designates that Team 1 in Region 1 will be on the offensive (attempting to score points). Team 2 encircle animation sequence is used to designate that Team 2 in Region 2 is on the offensive. The Halt Flash animation sequence is used whenever normal game operation isn't taking place during a match. If a user challenged a call, paused the game, was correcting score, or requested a change in cup orientation, the Halt Flash animation sequence is run. The default animation sequence is run in between actively running matches and whenever a confirmed shot was made. The table also features a set of switches to disable the light animation sequences for the entire table. One switch of the two was provided to the teams. Both teams have to be in agreement in order for the light animation sequences to be enabled on the table. The switches are rocker switches embedded with the rest of the user controls. The switches  operate with AND gate logic. To implement the design, the switches were wired in series to a power source and to an enable line capable of disabling the light animation sequences without restarting the animation control unit.

The easiest way to implement this system is with a timer and decade counters. A 555 timer is a simple part that can be used to provide a clock and decade counter is a part that takes in a clock signal and switches sequentially between its outputs. Using a mealy-state-machine design eliminates the issue of user error in programming or for reprogramming if replacement parts are needed. The 4017 is a common decade counter with 10 outputs, a clock input and a reset. However, this design limits the patterns that can be made without substantially increasing the quantity of hardware per animation pattern.

A programmable system was built using microcontroller and a decoding system to output the LED control.  The microcontroller takes in a 2 line input and decides what animation sequence to execute. The outputs of microcontroller go into a matrix of decoders built to drive various outputs for the animation. The main benefit of using a microcontroller versus the decade counters is the ability to reduce the number of parts to create more complex animation and light sequences. Although both designs are capable of choosing to exclusively power only one selected LED at a time, the decade counter design would require extensive wiring and extra parts to simulate all of the lights being powered at once. Although both designs lack the ability to choose to power more than one light at a time, a microcontroller takes considerably less hardware and wiring to create the effect of multiple lights on at a time.  The flicker fusion threshold is described as the frequency of at which periodic light pulses appear to be a complete and continuous light source to the observer. This phenomenon is caused by the stimulus effect of the photo lasting longer than the period of time in between light pulses.  Generally humans can’t detect flicker above about 50Hz. For the light intensity of LEDs, it’s more effective to run in the range of kHz. To wire a system to mildly entertain the average human user at even the flicker fusion threshold would require impractical quantities of hardware. The

37

Page 46:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

microcontroller can be programmed to toggle LEDs on and off of the programmer’s choice in any sequence to simulate a constant light source from multiple LEDs.  If we were to take an example of a 5MHz operating microcontroller, the microcontroller would be responsible for supplying each LED with 1kHz operation. If the microcontroller took a conservative average of 20 cycles per instruction, it would take .4 nano seconds to turn a light on and off. In a program loop, it would be possible to execute 2.5 million LED toggles in 1 second, assuming no other instructions and interrupts were also contained in the code. If each light were to be toggled on and off directly after the other, it would be possible to display up to 2500 light sources to appear constant. It could effectively operate in the kHz range without any risk of undesired results at all. The current design specification requires a minimum of 20 LEDs to have exclusive control.

3.2.5 Capacitive TouchOne of the key aspects of an electronic beer pong table is the capability to recognize the presence of a liquid in the cups. If a liquid is detected, the cup is in play; otherwise, there is no cup in the vicinity of the sensor. Differentiating a full cup from an empty cup is essential to keeping an accurate score. While brainstorming about the table design in the beginning of Senior Design I, the group decided to make the table as universal as possible. This meant not creating any proprietary equipment aside from the table itself (i.e. special cups or balls). To achieve this, it was decided to make use of capacitive touch technology to sense the presence of liquid in the cups.

The capacitive touch phenomenon has become very commonplace in commercial applications requiring user interface. From iPods to cell phones to touch screen kiosks, one would be hard pressed to go anywhere in modern society without the opportunity to interact with something through a touch interface. Because of its increased popularity in applications, capacitive touch units have become relatively easy to manufacture.

In order to create a capacitive touch unit, a capacitor that can be affected by outside influences must be created. In order to achieve this, one can imagine unraveling a capacitor into a sheet, allowing the electric field within it to leech into the space surrounding the capacitor. To achieve this effect in a PCB format, a capacitor must be formed between two separate portions of the PCB. In Figure 16, this is done by separating the center sensor pad from the rest of the material with a gap in the solder mask and signal trace. The dotted lines in the figure

38

Page 47:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

Figure 16: Illustration of a PCB capacitive touch unit[Courtesy of Texas Instruments, PCB-Based Capacitive Touch Sensing with

MSP430]

represent the electric field created between the sensor pad and the surrounding grounded PCB material.

Capacitive touch is possible due to the dielectric properties of humans. As the composition of humans is largely water, our skin and muscle can act as a dielectric. If humans did not contain so much water, human computer interface devices all over the world would probably function much differently from what we see today.

Capacitive touch sensing works on a principle called mutual capacitance. In a capacitive touch unit, there are multiple areas which function as capacitors. When an object, such as a human finger, moves into the proximity of the unit, the object displaces air above the unit, changing the free space capacitance.

In Figure 17, the presence of the finger raises the values of C3 and C4 to some value, increasing the overall capacitance C1+C2+C3||C4. Also, when there is nothing but air above the unit, the capacitance is effectively constant. Since the capacitance of different dielectrics differ, capacitor C2 in the image above changes when the proximity of the finger changes.

As with all technology, the cheaper it becomes to manufacture, the more pervasive it becomes in commercial applications, and vice versa. As such, the Texas Instruments capacitive touch booster pack was a good option for this application. The capacitive touch booster pack from TI is a rather basic unit, intended for use with their MSP430 Launchpad unit as a learning tool and development kit. The unit itself, depicted in Figure 18, has six separate areas each counting as a sensor

39

Page 48:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

Figure 17: Illustration of how the capacitive touch unit measures capacitance[Courtesy of Texas Instruments, Getting Started with the MSP430 LauchPad]

by itself. For this application, only the unit's proximity sensor was used. Thanks to its efficient design, the proximity sensor area makes use of only one pin. This allows one MSP430 on each side of the table to control all six capacitive touch sensors.

The MSP430 is capable of doing capacitive touch sensing in two ways, the Relaxed Oscillator method, and the Resistor Capacitor method. Each has its own advantages and disadvantages.

Using the Relaxed Oscillator method of sensing, the MSP430 measures the frequency of charge/ discharge cycles of the capacitor C1+C2+C3||C4 in a fixed period of time. When the capacitance increases, the time constant τ=R∗C increases, leading to an increase in charge/discharge time. This results in a decrease in the frequency of charge/discharge cycles measured by the MSP430. Using the RO method of touch detection has some advantages according to Texas Instruments.

Most robust against interference 99% of measurements performed in low power mode Low CPU usage Relaxed Oscillator integration is 100% hardware

This method's robustness against signal noise is something the team regarded highly, as it made detection in an inconsistent environment more robust. Also, most of the process is done outside the CPU, allowing for much more memory space for code, as well as more CPU cycles which can be dedicated to communication and aesthetics.

The other method of capacitive touch sensing, available in the MSP430, is called the RC (resistor capacitor) method. Using this method, the charge/discharge time as described earlier is measured directly. The specific window of interest is the amount of time it takes for the capacitor to charge from 33.3% of its capacity to 66.6%. When the capacitance C1+C2+C3||C4 increases, as it does in the

40

Page 49:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

Figure 18: Layout and dimensions of TI capacitive touch unit[Courtesy of Texas Instruments, Getting Started with the MSP430 LauchPad]

presence of a dielectric other than air, the time constant τ=R∗C increases, resulting in an increase in the time taken to charge from 33% to 66%. This method has the advantage of being available on all MSP430 models, as it does not make use of any special hardware such as comparators (unlike the RO method).

3.2.6 Cup Sensor LEDsIn order to add aesthetic appeal to the cup sensor units, each unit has five RGB (red, green, blue) LEDs incorporated into them. These LEDs are used to add aesthetic appeal to the units when a full cup is present as well as when a cup is not present. In addition to sensing the presence of a full cup in the vicinity of the sensor, the six cup sensors on each side of the table are used in conjunction at the beginning of each match to select team color.

RGB LEDs are essentially three LEDs integrated into one unit. By controlling each color individually, the LED can display a full spectrum of colors from red to violet. This seems like a simple task to achieve, but some issues do come into play.

In an RGB LED, different colors can require different current values in order to properly display the color. This is due to the different materials required to create a diode which outputs different wavelengths of light. If these current requirements are not adhered to, separate colors intensities will not match, or the LED could burn out all together. Color intensities could also vary due to manufacturing inconsistencies; a batch of one thousand LEDs will never be perfectly identical.

Due to all these inconsistencies, creating a circuit with only discrete parts which functioned well given the situation was very difficult. One technology which has been developed specifically to counter these intensity variation issues is called "dot correction". Dot correction enables the control of the current supplied to

41

Page 50:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

each LED in an array in order to create uniform brightness. It was decided to apply dot correction to the RGB LEDs of the cup sensor units using Texas Instruments TLC5940 LED Drivers.

The TLC5940 is a sixteen output, programmable, constant current sink. As seen in Figure 19, the LED driver contains integrated EEPROM memory for dot correction storage. This allows each unit to be programmed with the specific dot correction values for the LEDs connected to it only once, instead of continuously transmitting and updating the values using the serial communication interface. Dot correction is set using the following equation:

IOUTn=

IMAX∗DCn

63

where IMAX is the maximum current required by any color of the LEDs. The value of IMAX is gleaned from the specifications of the LEDS. This value is written to the chip using a resistor external to the IC, connected between the IREF pin and the GND pin. The value of this external resistor is determined by the equation:

R IREF=1.24VIMAX

∗31.5

Figure 19: TLC5940 Block Diagram[Courtesy of Texas Instruments, TLC5940 Datasheet]

Dot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from 0% (0000000) to 100% (111111). The actual current value of each pin can be found using the equation:

42

Page 51:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

IOUT N=I MAX∗DC n

63

In addition to being able to perform dot correction, the TLC5940 also has grayscale PWM (Pulse Width Modulation) capability for each output pin, which is controlled by a twelve bit word for each output pin. This allows for brightness adjustment to the tune of four thousand and ninety six steps, ranging from 0 being off to 4095 being 100% brightness. The twelve bit words controlling the brightness for each pin are programmed using the serial communication input SIN, which shifts the bits on the pin into a 192bit shift register. This serial communication is controlled via the GSCLK or Grayscale Clock pin. The frequency for this communication is determined by the equation:

f GSCLK=4096 grayscale values∗f update

This grayscale PWM allows for further control of LED luminosity, as well as creating colors which are combinations of red, green, and blue light, as colors such as purple require the combination of red and blue light. The chip also has functionality which was not used in this application, such as LED open and over temperature detection. This combination of capabilities was perfect for application in the cup sensor apparatus

3.2.7 Light BarrierThanks to science, we know today that light exists in a spectrum. One can easily obtain a prism, hold it up to a beam of light, and see this spectrum for themselves. What many people don't realize however is that visible light is simply a small portion of the spectrum known as the electromagnetic spectrum. This spectrum contains all physically possible frequencies/wavelengths of electromagnetic fields, ranging from Extremely-Low Frequencies (ELF), also known as radio waves, all the way to high frequency, high energy waves known as Gamma Rays.

Thanks to modern technology, humans have gained the ability to harness the powers of these wavelengths which are outside of the range visible to us. From using X-Ray radiation to view bone structure, to using low frequencies for data and voice communication, it seems as if no part of the electromagnetic spectrum is outside of human control anymore. One very common range of wavelengths which humans have harnessed is known as infrared radiation.

Infrared radiation is the electromagnetic waves ranging from seven hundred eighty nanometers to three micrometers. These waves exist at wavelengths just below that which humans can see (four hundred to seven hundred nanometers). This means that not only are they invisible to humans, they are low enough power to be nearly harmless, not only to biological organisms, but also to integrated circuitry. On the other hand, the infrared range of electromagnetic waves exist at a high enough frequency to not be able to pass through solid objects, unlike their higher wavelength counterparts, radio waves.

43

Page 52:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

Because infrared waves cannot pass through solid object such as walls, they have been adopted into technological applications which require short range remote communication. Probably the most common application of these waves is the television remote control. This form of remote control uses pulses of infrared light emitted by the remote control, and detected by a photo receiver embedded in the television, in order to communicate over the short distance from the couch to the television.

Another common application of infrared light is its use as a barrier sensor. Anyone with an automatic garage door has probably noticed the door becomes inoperable if an object is in the threshold of the door. This is because automatic garage doors make use of an infrared emitter/detector pair in order to sense if an object is in the way of the door, were it to close. Instead of using pulses of light however, this application continuously emits infrared light on one side of the doorway, which is detected on the other side of the doorway by a photo detector. If the beam of light is interrupted, say by a child walking through the doorway, the system disables downward motion of the door.

Yet another common application of infrared radiation is called passive infrared sensing. Passive infrared sensors are most commonly used for motion detection. In this form, the sensor determines a “normal” state. The normal state can be described as the amount of infrared radiation detected the majority of the time; for instance, the amount of light detected when a room is empty. When a mobile object enters the view space of the sensor, the amount of infrared detected by the sensor increases. This is because everything that exists above absolute zero temperature emits radiation.

An emitter/detector pair is relatively simple to implement thanks to today's technology. The following schematic shows a configuration which operates in a way which combines the applications described earlier.

In Figures 20 and 21, an infrared LED continuously emits light. When there is nothing within the working range of the emitter, the detector, in this case another infrared LED, will have a constant voltage drop. This voltage drop depends on the operating specifications of the LED. When an object moves within the range of the sensor, infrared light will be reflected off of the object and be detected by the receiver LED. This will increase the voltage drop across the LED, which is detected using the comparator.

Figure 20: Simplified emitter

44

Page 53:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

Figure 21: Simplified detector

Infrared emitters are available in the form of common LEDs, as well as infrared laser diodes. In general, infrared light generated by a LED diffuses more quickly, as LEDs have a much larger viewing angle than lasers do. Also, LEDs can emit multiple wavelengths of light. In the case of infrared LEDs, these wavelengths could range from Near Infrared (NIR), which are the wavelengths closer to visible light, all the way to Far Infrared (FIR), which are wavelengths on the radio wave side of the infrared range. Infrared lasers and all lasers in general, emit a very specific wavelength of light.

Due to the increase in interest in and research of robotics, many manufacturers have developed novel sensor arrays to facilitate creation of intricate robots. Making use of infrared light is a common element of some of these sensor arrays. One design of these infrared sensors makes use of an infrared emitter, paired with a Charge-Coupled Device (CCD) detector. Using this configuration, these sensors are capable of measuring the angle of incidence of the infrared light reflected off an object and detected by the detector. This measurement then gives the distance of the object from the sensor, because the distance between the emitter and detector is known by the device. A device of this nature has been developed by Sharp. Each of the sensors in the GP2D family of sensors is a unit embodying the emitter and the CCD detector into one unit; and is capable of doing this measurement of the angle of incidence. Figure 22 may be used as a visual aid to better understand this functionality. In the figure, the measured angles are θ1 and θ2. One will notice that the detected angle for an object which is closer (θ2) is much smaller than the angle detected when the object is further away (θ1).

45

Page 54:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

Figure 22: Example of Sharp GP2D functionality

Originally, it was desired to integrate infrared light into the DCPPTSS light barrier, in an attempt to make the barrier invisible to human eyes. The purpose of the barrier is to differentiate between missed shots, and a thrown ping pong ball which lands in a cup. This was a rather challenging design problem for multiple reasons, and the group ended up simply using 650nm red light instead.

First, infrared light is very close to visible light. As such, most sources of visible light also emit infrared waves. This is why on very bright days; automatic garage doors will become inoperable for seemingly no reason. Also, ping pong balls are spherically shaped. This would cause much of the infrared light which hits a ping pong ball to be reflected at an angle different from its angle of incidence. Another issue was that regulation ping pong balls have a diameter ranging from thirty six millimeters to forty four millimeters. This means whatever design was finally used for the barrier in the final table design; the barrier needed a relatively high resolution. Finally, ping pong balls travel through the air at a relatively high speed. Because of this, the final barrier design has a relatively high refresh rate.

One way to compensate for the effect of ambient light on the infrared detectors, a modulated output signal from the emitter may be used. If the emitter is constantly emitting by using a DC source, the signal generated by the detector will also be a DC signal, with magnitude proportional to the distance between the emitter and detector. This is also the state the output signal would be if only ambient light is detected, with the output signal magnitude proportional to the amount of ambient light. If a modulated input signal to the emitter is used, such as a square wave, the output signal of the detector will be a combination of AC and DC signals when the emitter is being detected.

In this configuration, the detector signal then needs to be filtered using a Band-Pass Filter with a critical frequency ω0 equal to that of the frequency of the modulated signal supplied to the emitter. This filtered signal would then be passed through a rectifier, converting the signal to a DC voltage proportional to the distance between the emitter and detector. This process is illustrated in Figure 23.

46

Page 55:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

Figure 23: Pulsed infrared signal filtering

There exist integrated circuits with all these modules integrated into them, such as the Vishay TSOP17 family of photo modules. Another advantage of using this method of pulsing the emitters is that it allows the system to send much higher currents through the emitters, without much added danger of damaging them. This is because the current will only be at that peak level for a miniscule amount of time, inversely proportional to the frequency of the square wave. The benefit of driving higher current through the emitter is it creates a much stronger burst of infrared light, allowing the light to travel further. This is exactly how remote control emitters are capable of sending their infrared light across a large room.

3.2.8 Ball WasherThe water circulation system is a low maintenance cleaning system to keep acceptable levels of hygiene throughout the players experience.

The water circulating system consists of a water reservoir containing the majority of the water to supply the system, two cleaning basins for user and ball access, a cleaning unit to disinfect the water system, a pump supplying recirculation of collected fluids, and interconnecting piping to move the water between systems. To decrease weight of and cost of the overall system, it was more feasible to implement a system with one cleaning unit, one reservoir, and one pump all centrally located between both “ends” of the system. The design layout was based on a single pump located inside the reservoir.The choices for pumps vary depending on pump design, power consumption and operation.  

The pump specifications are as follows:

Weight under 5 lbs Able to accept 120VAC –OR- 12VDC Able to run indefinitely Submersible Flow rate equal to or greater than 5 times total volume of system

47

Page 56:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

Able to operate between 40-120F Withstand the lifetime of 7 years Water tight

The Piping design had to be done with a system of components that were highly customizable but modular. The piping system also must withstand all variations and options of cleaning systems applied to the water circulation system. The system must be able to maintain its structural, physical, chemical, aesthetic properties during the planned lifetime of the entire Digital Competitive Precision Projectile Table Support Structure. The piping specifications are as follows:

Nonreactive with alcohols or phenols Can withstand temperatures ranging between 40F-120F Temp range variant 40F-180F if pasteurization used Water Tight Retain structural integrity over extreme temperature change through

conduction 1degree/second OR sudden contact temperature change over 30 degrees Fahrenheit

Able to maintain operational integrity with extended exposure to UV radiation if UV treatment is used

Nonreactive with chemical used for sanitation i.e. Ammonia, Sodium hypochlorite, etc…

Choices for piping material and design were copper pipe, iron pipe, Polyvinylchloride (PVC) pipe, hand casted composite (fiberglass). The three forms of pipe all have the advantage of being premade prebuilt sizes, shapes, fittings, and previously tested properties for comparison against parameters.

Hand casting a fiberglass system allows for customization to allow the water circulation system to be formed to be easily integrated in with the other components of the table. Fiberglass is nonreactive with alcohols and phenols, if properly formed and completely cured. It can withstand the temperatures rated above according to the PVC MSDS. Fiberglass is able to withstand extreme temperature changes. Fiberglass has the ability to withstand UV radiation and is non reactive with most common cleaning solutions.

Copper pipe was a primary choice due to its current application in potable water systems currently used throughout construction in the United States. Copper can withstand the specified temperature range. Copper is unaffected by UV radiation. Unlike iron, copper only corrodes at the exposed surface.

The most ideal choice was PVC pipe. PVC pipe is readily available in different sizes, thickness, temperatures ranges, and pressures. PVC, like copper piping, has preformed fittings and shapes to allow for flexibility in design. While not as thin as fiberglass, the PVC is rigid enough to be executed while being able to incorporate the space needed to integrate the other systems involved. PVC also

48

Page 57:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

is nonconductive. Because the water circulation system will be closely integrated underneath the table, it was ideal to choice a material for the system that would be an insulator versus copper which is one of the world’s greatest conductors. The piping system will be in direct contact with users and a circulation pump so all measures to prevent electric shock must be taken into account.  PVC is damaged by UV radiation and is known to become brittle, but keep structural integrity and will have an expected safe operation period much longer than the predicted life of the table.  PVC is nonreactive with most alcohols and ethers. Ether is common used to clean PVC before installations and PVC is also common throughout households and irrigation systems indoors and outdoors. PVC has the ability to withstand drastic temperature change without jeopardizing its structural integrity. Overall, the choice for water circulation system conduit, PVC seemed to be the ideal candidate because of it’s low cost, high flexibility for design, chemical resistance, and insulating property.

When considering choices of different forms of sanitation for the water cleaning circulation system, the main aspects considered were price and complexity. The three main forms of sanitation for keeping water sterile currently used today are chemical treatment, pasteurization, and UV light.

The chemical treatment is a guaranteed effective way of treating contaminated water. For a chemical system to be implemented on our design requires a chemical dosing module consisting of PLCs to control the flow to our water reservoir as well as measuring apparatus to keep track of current concentration inside of the system and a surplus supply of chemical dosing reserved on the entire table to provide dosing for the water circulation system. The overall additions to the circulating water cleaning system would be an extra pump, a reservoir tank separately per chemical, flow meters, and control system as well as additional piping to route chemicals to the water reservoir. An additional pump would increase the weight of the overall project as well as supports to keep the pump safely secured to the structure. The pump would also increase power consumption and create a more complex overall layout to maintain safety and simplicity.

Pasteurization is the process of heating mixtures and other suspect things to high temperatures, 165 F for an extended period of time to kill bacteria. The benefits to this form of water treatment are the fewer number of items needed to maintain the sanitation system. There is little to no maintenance required for the system to continue safe operation. It requires no chemical dosing units or extra pumps. However, the issue of temperature becomes a safety factor. In order for pasteurization to be effective, the temperature of the water must remain above 165 F for a minimum of 45 seconds. 165 F isn’t considered to be a temperature that humans find pleasant. The increased temperature also would affect the temperature of the ball being washed, which in turn heats the target liquid, creating undesirable game play. In order to maintain an effective pasteurization system, the water circulation system would have to heat the questioned water to

49

Page 58:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

165 F and maintain that temperature for the minimum period and then return the water back down to room temperature. This could be achieved with a peltier junction or a heating element, cooling fan& heat sink set up.

Figure 24: Peltier Device Figure 25: Heater/Radiator Pasteurization Illustration Pasteurization Illustration

Both designs have benefits and flaws. The Peltier junction design uses one device for both heating and cooling. A peltier junction intakes electric power and create a difference in temperature on the two different sides of the junction. If you remove heat from the hot side while power is being supplied to the junction, the faster and lower the opposing side, the cold side, will drop in temperature and vice versa. A peltier junction has no moving parts and virtually requires no maintenance.  The peltier junction also features the benefit of being completely silent during operation. The question is about the process of raising the dropping the temperature. The main two factors are exposure time and magnitude of the forced temperature change. Exposure time can be increased by decreasing flow rate (slower water circulation overall), or increasing pipe diameter. Increasing the pipe diameter allows for water to flow slower where the exposure to the junction is and then increase when the pipe diameter is narrow near the washing pool. In this case, we achieve both methods mentioned above for decreasing the flow rate for increased exposure time. Another option is increasing the power to the peltier junction. The temperature increase would decrease the length needed to heat the water to the required temperature making the over all design smaller. The drawback to this design is that in the event of no current flow (i.e. table shut down) there is the possibility of extreme super heating of the water in the exposure area possibly rising above the piping’s temperature rating or boiling inside of the pipe.

In the design of a heater and radiator, its biggest benefit is the ability for the reservoir of water to act as the cooling radiator as well. Both designs add the issue of heat. Each design has a risk of the user being exposed to heated water.

50

Page 59:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

The heater and radiator design also requires a fan for forced draft over the cooling fins of the heat sink.

The last option for the sanitation system is UV radiation. UV radiation is the process of using electromagnetic radiation 230nm-300nm to kill bacteria.  The allows for minimal moving parts and extra added weight to achieve sanitation. The UV sanitation system only requires for a visibly exposed surface to the water. The UV sanitation system also decreases the amount of extra hardware to the original design of the water circulation system.  The UV light source can be placed inside the water circulation system reservoir. Placing the light source there allows for the water to have maximum exposure time since the water flow will be at minimum inside of the tank. The tank specification is as follows:

3 times larger than the total volume of both ball wash containers. A maximum of 1 gallon.

3.3 System Architecture OptionsBefore determining the correct system architecture an evaluation of the Digital Competitive Precision Projectile Table Support Structure had to be made, with the functions of the DCPPTSS being analyzed. The DCPPTSS detects if a ball enters or misses a cup. If a ball enters a cup, the corresponding LEDs are shut off and a point is awarded to the thrower(s). Once the number of throws is complete the state of the game changes and the opposition now becomes the thrower(s). These actions continue until a player area has had all of its cups removed.

When the functions of the DCPPTSS are generally defined for the purpose of the game there only appear to be two system architectures that could potentially handle those tasks. The two system architectures considered for this project are the distributed computing architecture and the event-driven architecture. Distributed computing allows for the computing of different processes concurrently. This would be great because there would be no need for a central processor to delegate functions. Each processor can be programmed for its specific function. There is an issue with this method. The issue is a lack of control for systems that aren’t needed at a specific time which leads to unnecessary power consumption and errors that would occur in terms of ball detection occurring on opposite ends of the table.

The alternative architecture for the DCPPTSS was the event-driven model. This model was considered because the game of beer pong itself is a turn-based game. Due to this realization it would only make sense to have an architecture that would utilize a method that would coincide with the mechanics of the game. Event-driven architecture of course is triggered by an event. In the case of the DCPPTSS the event is the ball being detected by the light barrier system. If the ball detection system detects that the ball thrown is a miss it will communicate to

51

Page 60:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

that to the central processor and will again wait for another event to occur. If the light barrier system detects that the ball thrown was made into a cup the system will communicate with the central processor which will then receive input from the capacitive touch system. Once the amount of throws for the player(s) is up the opposition will have their turn. Due to the turn based system of the game and a central processor, whenever it is a player’s turn the system on their side of the table can be put into a sleep mode which will reduce power consumption since it is not needed. The diagram in Figure 26 shows the connections between the central processor and the different systems that is used on each side of the table. These connections create a control mechanism in which the central processor will decide which side will be operational and which side will be in sleep mode.

Figure 26: Event Driven Architecture

When comparing these two architectures, distributed computing and event-driven, it is clear that the event-driven architecture is the one best suited for the Digital Competitive Precision Projectile Table Support Structure. Distributed computing allows for each individual system to operate itself, hence the functions of the DCPPTSS can be equally distributed amongst the different processes. Its lack of control for the integration of the sub-systems is the issue with the using the distributed computing architecture. The event-driven architecture better suits the DCPPTSS because of the turn-based game play. With the event-driven architecture it allows for a single control unit to keep a certain order with the different sub-systems when it comes to their processes.

4.0 Project Hardware and Software Design4.1 Design SummaryDesign of the Digital Competitive Precision Projectile Table Support Structure turned out to be a rather challenging problem, making the project a perfect challenge for four relatively inexperienced engineering students. The group decided upon a very modular design, in order to circumvent many of the challenges a less modular design would involve, such as combining code written by multiple people into one coherent code. This modular design also allowed for

52

Page 61:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

an equal division of labor, with each member of the group being in full control of the design of their designated subsystem. The block diagram in Figure 27 illustrates the modularity of the entire system.

Figure 27: DCPPTSS block diagram

In order to achieve this very modular design, most of the subsystems of the DCPPTSS run on their own microcontroller unit. The microcontroller of choice for the subsystems of the project is the Texas Instruments MSP430. This controller was chosen mainly because of the current state of University of Central Florida relations with the Texas Instruments corporation. If Texas Instruments was not currently pushing to supply the university with all their embedded system needs, another controller would likely have been chosen.

To control all these modular subsystems, there is a single central controller unit. The central controller functions to keep track of the overall game state, as well as coordinating events of each subsystem. In order to communicate with the subsystem microcontrollers and coordinate all the possible separate events, a communication system using the I2C protocol was chosen. This communication protocol was chosen because it only requires two lines to achieve serial communication between all controllers.

53

Page 62:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

On the software side of the design, the architecture is a modular event driven architecture. This means all physical events that occur within the vicinity of the table are detected by their respective subsystem and trigger interrupts within their processing units. These interrupts then communicate game state changes between controllers using the I2C serial interface, mainly between the microcontroller of the subsystem detecting the event and the central controller.

In the design of the DCPPTSS, there are two main subsystems responsible for detecting events which are directly related to game play. One of these systems is the light barrier. This subsystem itself is designed in a modular fashion. In order for the barrier to function correctly, there are forty five laser emitter/detector pairs, effectively creating a coordinate plane over the surface of the table. When a ball is thrown, the detects the ball passing through itself. If the ball passes through the barrier at a point which is above a cup, the ball is assumed to have landed in the cup. This is where the second of the two subsystems comes into play, the cup sensors subsystem. This subsystem is responsible for detecting the presence of cups with liquid in them. In order to achieve this, each cup sensor unit has a Texas Instruments capacitive touch unit embedded into them. The capacitance of each cup sensor is measured using the relaxed oscillator method, and depending on the measured value, it is determined if there is a dielectric other than air present above the sensor. In addition to detecting presence of liquids, each cup sensor also has five LEDs embedded into it which will display team color, as well as changing behavior depending on presence of a liquid. The LEDs for each cup sensor unit are driven by a Texas Instruments TLC5940 LED Driver chip. The TLC5940s each use a serial communication interface to communicate with the MSP430 controlling them.

Detection of game state by these two subsystems was designed with a certain degree of tolerance, meaning there is roughly a twenty percent chance the system will improperly detect, or not detect at all, the given events. In order to counter these inconsistencies, a user interface was also designed, to allow players to correct any detection errors. The user interface consists of a sixteen character LCD display and three buttons, located at the middle of the table. The menu itself offers options to correct any errors; the option to label a shot interpreted as a made shot a miss, the option to forfeit the game, and an option to activate the re-rack of a team’s cups. The LCD also displays the current game state information: team number, number of cups left, and number of re-racks available; for each team.

Another subsystem of the DCPPTSS is the aesthetic LED array. For this subsystem, a multitude of LEDs are arranged around the perimeter of each team’s areas, as well as the overall perimeter of the table. These LEDs are all driven by a single MSP430, and display different sequences of animations depending on the state of the game. These animations function to emphasize the current state of the game.

Finally, there is the sanitation subsystem. This subsystem consists of two “wash cups”, one on each side of the table. These “wash cups” are be PVC reducers

54

Page 63:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

embedded into the table, and connected together to a single, shared reservoir. A water pump pumps the water through the UV sanitation unit, and into two “wash cups”. From the “wash cups” the water then travels back to the reservoir using only gravity. This subsystem was developed in order to counter one of the largest health hazards known to college students, playing beer pong with a dirty ball. Because of the nature of the game, ping pong balls often wind up on the floor, picking up a wide variety of dirt and germs. This system functions to clean any balls which have been on the floor, before they are brought back into the game to be used as projectiles.

4.2 System ArchitectureThe system architecture that was chosen for the Digital Competitive Precision Projectile Table Support Structure was the event-driven architecture. Due to the game of beer pong’s turn-based game play, it goes hand in hand with the style of event-driven architecture. Now that the architecture has been chosen, the description of how this architecture is used and how it affects the sub-systems will also be explained. With the event-driven architecture the Digital Competitive Precision Projectile Table Support Structure is essentially in a buffer mode until an event occurs. The DCPPTSS is comprised of many separate event-driven processes.

Event-driven architecture focuses on the changing of states. The initial state that triggers the domino effect of event-driven sub-systems is the state of ball detection. The ball detection system is set to no ball detected at default. When the ball detection sub-system is in a state of no detection then nothing occurs. Ball detection for the Digital Competitive Precision Projectile Table Support Structure is defined as a ball entering the laser plane. With ball detection being defined in such a manner it provides a standard for what is and what is not detected which affects the other sub-systems. The activity of the ball detection sub-system being in a no detection state in an activity diagram simply loops back into itself. Once a ball is thrown into the ball detection area the state changes. This change in state creates much activity for the rest of the sub-systems used in the Digital Competitive Precision Projectile Table Support Structure.

The next stage in the event-driven chain when a ball is detected is if the ball has entered a cup in the opposition’s player area or not. This will be detected by the capacitive touch sub-system. The default state of the capacitive touch sub-system will be determined at the beginning of the game. When the game begins and the systems are powered the capacitance are taken at that time as a reference making the initial state of the capacitive touch sub-system set to no capacitive change. By doing this any change in capacitance from the initial reading will cause a detection by the capacitive touch system. The capacitive touch sub-system will not be able to detect if the ball is in a specific cup, but what it can detect is the opponent removing the corresponding cup.

55

Page 64:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

Once the capacitive touch sub-system has detected a change in capacitance the next system to become activated is the central control system. The central control system is a key part to this entire project. The central control system is responsible for putting the unused systems into sleep mode, receiving the interrupt signal from the laser grid array ball detection sub-system, receiving specific information in terms of location of the ball from the capacitive touch sub-system, sending information of the corresponding cup to be removed to the display monitor while increasing the player’s point total, checking to see if all of the cups on the opponent’s side of the table are all removed or not, and also to see if the amount of throws remaining for the player has been reached. The game continues as long as there are cups remaining on both sides of the table in which the state is set to yes. Once the cups remaining state is set to no, the game is then over.

Figure 28: DCPPTSS Overall Activity Diagram

4.3 Sub Systems4.3.1 Central Controller

The system that controls the majority of the systems used in the Digital Competitive Precision Projectile Table Support Structure is the MSP430G2553 microcontroller central control unit. As the central control unit, the MSP430G2553 microcontroller central control unit is responsible handling data that is sent to and

56

Page 65:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

received by the surrounding sub-systems. The MSP430G2553 microcontroller central control unit communicates with microcontrollers that have a direct connection to the functions of the game play. These are the laser grid array ball detection and the capacitive touch sub-systems. The MSP430G2553 microcontroller central control unit is also responsible for the reduction in power consumption, keeping score of the game, keeping track of the number of throws remaining per turn, changing LED location once player turn is over, as well as the number of cups remaining on the table for each player, and displaying this information on the monitor embedded within the center of the Digital Competitive Precision Projectile Table Support Structure.

When it comes to handling data, input and output, the MSP430G2553 microcontroller central control unit needs a way to communicate that data. When communicating that data between a sub-system such as the laser grid array ball detection and the capacitive touch sub-systems it is best to have a communication method where there is an order in terms of priority. The priority being the MSP430G2553 microcontroller central control unit has the highest priority while the sub-systems follow. This method of communication is necessary due to the fact that the MSP430G2553 microcontroller central control unit is the central control unit. If a sub-system were to have higher priority over the MSP430G2553 microcontroller central control unit then the MSP430G2553 microcontroller would in fact not be the center of control. The MSP430G2553 microcontroller central control unit will need full control over the sub-systems. The central control will implement a master-slave communication system in which Inter-Integrated Circuit (I2C) provides. Figure 29 below shows the master-slave arrangement between the MSP430G2553 microcontroller central control unit and the laser grid array ball detection sub-system and the capacitive touch sub-system.

Figure 29: I2C Master-Slave Communication

57

Page 66:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

Power Reduction - Due to the turn based style of beer pong, some of the sub-systems will be used only half of the time during the entire game. This means that if all of the sub-systems were to be on during the duration of the game, then unnecessary power would be consumed. Since the style of beer pong is turn based so should the usage of the sub-systems be in a sense. To combat the unnecessary power consumption issue the MSP430G2553 microcontroller central control unit will communicate with the sub-systems, laser grid array ball detection system and capacitive touch system, of the thrower’s side to go into a standby type of mode. The MSP430G2553 microcontrollers operating the laser grid array ball detection sub-system as well as operating the capacitive touch sub-system are cable of entering different sleep modes. Therefore the MSP430G2553 microcontroller central control unit will send a message to these microcontrollers to have them enter the sleep mode. Once it is the opposition’s turn the laser grid array ball detection sub-system and the capacitive touch sub-system that are operational will then be requested to enter into a sleep mode, while those that are in a sleep mode will be sent an interrupt request to wake them up.

Central Control Unit communicating with ball detection - Another part of the Digital Competitive Precision Projectile Table Support Structure is the communication between the MSP430G2553 microcontroller central control unit and the laser grid array ball detection sub-system. The laser grid array ball detection system, when not in sleep mode, will buffer to wait for a projectile, the ball, to enter its laser grid array field. Once the projectile has been detected by the laser grid, the MSP430G2553 microcontroller central control unit is notified.

Central Control Unit communicating with cap-touch - Communication between the MSP430G2553 microcontroller central control unit and the capacitive touch sub-system are another part of the Digital Competitive Precision Projectile Table Support Structure. The capacitive touch sub-system, when not in sleep mode, buffer to wait for a change in capacitance. This change in capacitance will not occur from a projectile entering a cup, but from opponent removing the cup. The MSP430G2553 microcontroller central control unit will then receive an interrupt from the capacitive touch sensor when there has been a change in capacitance from the reference which is taken at the beginning of the game. Once the MSP430G2553 microcontroller central control unit receives the information from the capacitive touch system, the MSP430G2553 microcontroller central control unit will send a request to the corresponding capacitive touch sensor to turn off for the duration of the game. The results of the remaining capacitive touch sensors will then be sent to the monitor as the cups remaining.

Keeping score of game - When it comes to keeping score of the game the MSP430G2553 microcontroller central control unit does not use an external system for this task. The MSP430G2553 microcontroller central control unit itself keeps track of the score. It is able to do this because of its 256 KB flash memory. The functions of the table are programmed onto the MSP430G2553 microcontroller central control unit in the programming language of C. The score

58

Page 67:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

for each player is stored in the variables ScoreA and ScoreB for the player(s) of player side A and player side B, respectively. Both of these variables are initialized to zero at the beginning of each game. A player’s score increases by one with each ball that is made. This increment in score occurs only when the capacitive touch system senses a change in capacitance for the corresponding cup. The score variables are contained within a scoring function. The scoring function is contained within an if statement and called only if the laser grid array ball detection system has detected a ball and the capacitive touch system has received the reading of the ball’s location.

Keeping track of throws per turn - Keeping track of the number of throws per turn per player is also an important aspect of the MSP430G2553 microcontroller central control unit. The function keeping track of the number of throws each player(s) has during their turn is programmed onto the MSP430G2553 microcontroller central control unit in the programming language C. The variables num_of_throwsA and num_of_throwsB are used to store the number of throws remaining for player side A and player side B, respectively. Both of these variables reside in the game program that is used to run the beer pong functions from the MSP430G2553 microcontroller central control unit. Each variable is used within separate for loops. The for loop initializes the number of throws to two and will decrement by 1 for each iteration/throw. As long as the number of throws is greater than zero the player(s) will continue to throw a ball. The for loop will buffer until the laser grid array ball detection system gets a reading on a ball that was thrown. In the event that a player completely misses the laser grid array detection area an option button will be available for a user to manually decrement the number of throws for a particular player.

LED location - An added feature to the Digital Competitive Precision Projectile Table Support Structure aesthetic LEDs. The animations begin as soon as the Digital Competitive Precision Projectile Table Support Structure is turned on. The initial route of the animation is around the entire table. This animation will continue until a user selects which player will start first. Once the user selects which player will start first, the animation of the LEDs will then move to the area of that player and continue to perform the animation in that area during the duration of their turn. When the number of throws for that particular player reaches zero, the LEDs will then move to the opposition’s side and perform the animation in that area during the duration of that player’s turn. The animation will continue back and forth until the number of cups for a given player area has reached zero. At that time the LEDs will continuously pulse on the player side of the victor.

Keep track of cups for both players - The task of keeping track of the cups remaining on the table for both players is not handed by a sub-system.  The MSP430G2553 microcontroller central control unit is in charge of keeping track of the number of cups remaining on the table for both players. The number of cups remaining for each player is stored in the variables cups_remainingA and cups_remainingB which are used for the player(s) on player side A and player

59

Page 68:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

side B, respectively. These variables are initialized to six at the beginning of the game. The game of beer pong will continue as long as the cups remaining on both player side A and player side B are greater than zero. The variables cups_remainingA and cups_remainingB are used within the remove cup function. The remove cup function will be called when the capacitive touch system senses a change in capacitance from one of the cups. Once the capacitance has been read from the corresponding cup the appropriate cups_remaining variable will be decreased by one.

Display information onto display - The diplay embedded in the center of the Digital Competitive Precision Projectile Table Support Structure is used as a notification system. This system is used to display different information to the players. Such information that is displayed to the monitor are the number of cups remaining for each player, the current score, whose turn it is currently, displaying if a player’s attempt was a hit or miss, and to display the winner of the game. These different aspects are displayed with a certain format. The number of cups remaining for each player will be displayed to the monitor by its MSP430G2553 microcontroller. The information received by the monitor comes from the MSP430G2553 microcontroller central control unit which has the variables for the remaining cups of each player, cups_remainingA and cups_remainingB. Whenever these variables are updated the corresponding cups shown on the monitor are also updated.

The current score of each player is also displayed onto the monitor. The scores come from the variables scoreA and scoreB. Once the variables of scoreA and scoreB change, they will also be updated on the monitor for the players to view. When it comes to player turn an indicator on the monitor shows exactly which players’ turn it is at that time. The indication of player turn comes from the throws_remainingA and throws_remainingB variables that are be stored onto the MSP430G2553 microcontroller central control unit. The initial indication is caused by the user selection which player will start first. After this selection is made, the ball indication will resort to the throws remaining variables reaching zero. Once the throws remaining variable for a player’s side reaches zero then the system knows that it is the opposition’s turn to in the Digital Competitive Precision Projectile Table Support Structure.

The final feature of the monitor for the Digital Competitive Precision Projectile Table Support Structure is displaying the winner of the game. This is achieved by checking the variables stored on the MSP430G2553 microcontroller central control unit, cups_remainingA and cups_remainingB, to see which one reaches zero. Once one of the cups remaining variables is decremented to zero, the result of which cup area is stored within a loser variable. This loser variable is used within an if statement. Therefore if loser is equal to cups_remainingA, then player B is the winner. Conversely if loser is equal to cups_remainingB, then player A is the winner. The output is displayed on the screen. Each player will see if they won or if they lost.

60

Page 69:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

4.3.2 User Interface

The User Interface is an important part of the Digital Competitive Precision Projectile Table Support Structure. It provides an additional method for the users (players) to interact with the table beyond just using it for a place to put the cups. It provides the players with simple, easy to digest information about the current game, as well as tracks and manages the currently playing teams and the team that is in line to play next. It is also a critical system for making sure game play flows smoothly. One of the major subsystems in the DCPPTSS that the group found to be prone to faults is the laser grid that will detect whether the ping pong balls land in a cup or not.

This issue is caused by the nature of how the laser grid is constructed (see section 4.2.5 Discretized Laser Barrier). A miss is detected when a ping pong ball passes through the grid. This means that the table is completely unable to detect a ball that misses the table entirely. In addition, it means that throws that appear to land in a cup may bounce off the rim resulting in a false-positive hit. The user interface seeks to remedy this issue. Without the ability to manually designate a throw as a miss, the game will mistakenly credit teams with hits that were not earned and the flow of the game will be broken, taking some fun out of the game.

Therefore, in addition to providing the players with a method to view information about the game, the user interface controls a host of unique functions that facilitates game play and game flow. In order to provide this functionality, a 16 character by 2 line LCD along with three navigation buttons was used for the entire table. In order to display the currently playing and the next-up teams, the same 16x2 display will be used for each team. For ease of implementation, the displayed used the RS232 communication protocol.

Note: While the group chooses to refer to the physical “game pieces” (i.e. ping pong balls and 16oz. party cups) as part of the user interface for testing (see section 5.2.2 Test Specifications - User Interface), that is where the distinction ends. For all intents and purposes, when talking about user interface design elsewhere, the group is only referring to those parts of the user interface that are digital electronics.

Current Game Status Display - In order to provide the players with information regarding the current game, a 16x2 LCD was used. This LCD constantly displays the current state of the game until a player changes the display (see Method of Interaction, below). For a given team, it will display that team’s team number, the number of cups left on their side of the table, and the number of re-racks that team has left. An arbitrary example of this is shown in Table 1.

61

Page 70:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

T e a m : 1 5 C u p s : 3

R e r a c k s L e f t : 2

Table 1: This is a basic example of the current game information as it would be displayed on a 16x2 LCD.

The most important number displayed on the 16x2 LCD is the number of re-racks since the number of distractions from the game is high, and it allows the DCPPTSS to take off some of the burdens of the players.

Method of Interaction - In order to access and activate the functions of the DCPPTSS, there must be some point of interaction with the players. Rather than having a button for each function, the group decided to use the buttons as a means to navigate a menu of functions. This way, the system remained easily scalable in case the group feels the need to add or remove functions.

The buttons that the group chose to use are Sanwa OBSF-30 arcade-style buttons. Three buttons are used to control the user interface; they control the functions for both teams/sides of the table. The buttons are momentary switches made large enough to be pressed easily. However, with all mechanical switches, there is the chance that the state of the button/switch will be unknown during the transitions before and after pressing the button due. The high and low spikes of the voltage are undesirable by the group because they may cause unintended consequences. In order to be more reliable, the group had decided to debounce each of switches to avoid that problem. The debouncer was implemented in hardware using a simple RC circuit. When a button is pressed, the debounce circuit will filter out the high-frequency vibrations of the mechanical switch. This produces a smooth change in voltage, which is then Schmitt-triggered on the MSP430 to form a clean digital signal. The schematic for user interface module can be seen below in Figure 30 below.

62

Page 71:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

Figure 30: This is the schematic of user interface module. Each of the buttons are labeled L, M, and R, respectively, and are filtered by a simple RC circuit. The

circuit uses 1uF capacitors and 33k Ohm resistors. The 16x2 LCD is driven serially by the RS232 protocol.

In order to access the function menu on a given 16x2 LCD, the player must press the middle button labeled “menu/select” while the display is showing the current game status information. Once that is done, four menu items are displayed, with each corresponding to a function which a player can perform; each function controlling the flow of the game in some way. In order to switch the display to show the game status for a given team, players press the button corresponding to their side of the table.

To exit the menu, the player needs only to select the appropriate option in the menu. Once this is done, the 16x2 LCD will display the current game status once again. If a player selects a function while the display is showing the menu, the DCPPTSS will carry out that function as long as the player confirms the action. The Figure 31 illustrates this process.

Navigation - For the player to be able to select and activate the function they wish to use, they must use the provided buttons to navigate the menu. The buttons, from left to right, are move cursor left (labeled “<<), “menu/select”, and move cursor right (labeled “>>”). If the cursor reaches the left-most or right-most menu item, and the cursor will wrap around to the opposite side.Figure 32 shows an example of what the menu will look like and how the buttons will affect the cursor (@) position.

63

Page 72:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

Functions - Each of these functions listed here (MISS, SKIP TURN, FORFEIT, and RERACK) have their own distinct effect on the game of Beer Pong, and by extension, have their own distinct effect on the DCPPTSS.

MISS is the function that will sees the most use by the players. This function is used in the case that a ping pong ball is detected falsely as a hit.

Figure 31: This is the simplified activity diagram for accessing the menu and/or executing a function on the DCPPTSS. The activity diagrams for the individual functions are provided below in their respective sections.

This function will also be used in the case of a wildly missed shot.

Figure 32: This is a visual representation of how the menu is navigated by the players. Red arrows correspond to the << button being pressed, and Green arrows correspond to the >> button being pressed. The arrows do not actually appear on the 16x2 LCD; they are for demonstration purposes only.

64

Page 73:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

When the players experience a MISS that cannot be handled by the DCPPTSS, they must activate the menu and select the MISS function. Upon selecting MISS, they must choose whether or not to confirm that function (YES or NO, respectively). If the players choose to deny the function, the display returns to the game status display. If they choose to confirm the function, the DCPPTSS attempts to find the remaining throws left for that team. If the DCPPTSS says there are 2 remaining throws, the remaining throws count is decremented and the 16x2 LCD returns to the game status display. If the DCPPTSS says there is only one remaining throw (that is, the current team missed their last through), play immediately passes to the opposing team, and the game status display returns to the LCD.

SKIP TURN and FORFEIT are the functions that the group saw the least amount of use by the players. Coincidentally, they required the least code and DCPPTSS interaction to complete their respective functions. Both functions, when first chosen, have a confirmation display shown in the same manner as above in the MISS function. When SKIP TURN is activated, the DCPPTSS responds by passing play directly to the opposing team. When FORFEIT is activated, the DCPPTSS declares the opposing team as the winner and then creates a new game for new teams to play. The below diagram (Figure XX) describes these two functions.

RERACK is the fourth and final function that players can activate on the DCPPTSS. There is no support for at all for automatically requesting a rerack, as it is a part of the game that can be done at any time the players choose. Since the capacitive touch cup sensors are in static locations, the DCPPTSS is unable to detect all of the cups in certain formations. For example, the DCPPTSS is unable to detect all of the cups placed in a “Power I” (all remaining cups placed vertically rim-to-rim), squares, or horizontal lines with more than three cups. Therefore, it is unfortunate but necessary that reracks that the DCPPTSS cannot detect are illegal placements. Figure 33 (a), (b), and (c) illustrates these functions.

65

Page 74:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

Figure 33a:(left) The activity diagram for the MISS function. This is the most complicated of all the functions because of the three different paths that can be taken during execution.

Figure 33b: The SKIP TURN (center) and Figure 33c: FORFEIT (right) activity diagrams. Both are fairly straightforward and it was simple to implement the basic functionality on the MCU.

When activated, the RERACK function first checks to make sure that the team that activated the function still has at least one of their allotted reracks. Then, the DCPPTSS pauses the game. While paused, the DCPPTSS does not register throws hit or missed, and does not acknowledge any other input. It waits for all cups to be removed from the capacitive touch sensors, and the game stays paused until all of the cups are placed back on the sensors. This assures that the rerack is valid, and that no cups are removed from play prematurely. Once all of the cups have been placed back on the sensors, play resumes, and the DCPPTSS once again attempts to detect hits and misses and acknowledge button inputs. Figure 34 below illustrates this process.

66

Page 75:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

Figure 34: The activity diagram for the RERACK function. This is the most complicated function due to the steps necessary for the DCPPTSS to take to

make sure the rerack was completed properly. It allows for no cup to be undetected when finished.

Confirmation - In order to avoid a given function being activated by a player by mistake, a confirmation screen is used. This is especially important because the functions can have extreme consequences when it comes to the outcome of the game (FORFEIT has the biggest effect). The confirmation screen displays a simple message of “Confirm?” and have two options “YES” and “NO”. Selecting YES will execute the function, while selecting NO will revert the 16x2 LCD to the current game status display.

Current/Next-up Team Display (CNUTD) - To display the currently playing teams and the next-up team, the group had chose to use a four-digit seven segment LCD, but instead used the single 16x2 character display. This simple solution allows prospective players to easily see what teams are playing and

67

Page 76:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

what team is next, to figure out how long they may have to wait until they are able to play.

Since there are two digits available in the 16x2 LCD module, they are used for each team for each corresponding side of the table. Since there are only two digits available for each team due to 16x2 LCD screen space limitations, the team numbers will range from 1 to 99, and when 99 is reached, the CNUTD wraps back to 1. When the DCPPTSS is first turned on, the user interface displays the first-up teams. The display shows these teams until the first team is selected by pressing either the left or right button. This display/switching will continue throughout the course of a game. When the losing team for a game is determined, that team will be replaced by the next-up team number on the 16x2 LCD, and the new next-up team will be determined. Since the team numbers will wrap back to 1, the next-up team number will skip any currently playing teams. The diagram in Figure 35 illustrates this process.

Figure 35: The activity diagram for the CNUTD. This process constantly executes in a never-ending loop to allow many games to be played without resetting the

system.

68

Page 77:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

Communication Protocol - For the user interface parts to work, they must be able to communicate with the rest of the DCPPTSS. Therefore, it had been decided to use MSP430G2553 as the device that drives the user interface parts. Since the central control unit is using the I2C protocol to communicate with allof the other MSP430s, the user interface will also use I2C. The 16x2 LCD only requires three lines: +5v, GND, and one line that is attached to the MSP430G2553 and driven by RS232.

Physical Layout - The user interface components were integrated with the side of the DCPPTSS. The 16x2 LCD and the corresponding buttons was constructed into a modules that later was attached to the aluminum frame of the table halfway between each side.

The 16x2 LCDs measure 3.15”x1.43” and the OBSF-30 buttons are 1.30” in diameter. As mentioned earlier, three buttons were used. These components were built into two custom modules that are 6”x4”. The modules were constructed of three layers: the components layer (top), wood mask/mounting layer (middle), and the printed circuit board layer (bottom). The layers of the module are illustrated below in Figure 36.

Figure 36: The side view of the 16x2 LCD and buttons module. This shows all the materials required to construct the modules. Not to scale.

The buttons and 16x2 LCD for the single module was positioned such that the buttons are “below” the display, evenly spaced with one another. The LCD was placed 2.5” from the “bottom” of the module. The buttons were placed along the bottom edge of the module. The buttons were labeled according to their function as well. This layout is illustrated below in Figure 37 as well as in the full table layout image.

69

Page 78:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

Figure 37: The layout of the buttons and the 16x2 LCD for each module. In this image, the buttons are the green circles, however final button color was different.

All measurements are in inches.

The module was located halfway between each of the short ends of the DCPPTSS, and hanging off from one long side of the table. This allows each team to easily access the user interface and control it for their team. Prospective players can easily access the user interface as well to see the currently playing teams.

4.3.3 Aesthetic LED ArrayThe illustration in Figure 38 shows the overall general schematic of the LED display on the table.

Figure 38: LED Array Decoder Wiring Diagram

70

Page 79:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

This design allows a microcontroller having minimum 7 free I/O pins to be able to provide full function to 32 LEDs. 5 pins are used in a 5 decoder matrix to create a 5 to 32 decoder module. There are four 3 to 8 decoders and 1 2 to 4 decoder. Each 3 to 8 decoder has an enable line. This design allows the 4 decoders to share all 3 inputs and still be able to be exclusively selected to have a selected output. The enable lines are controlled by the 2 to 4 decoder, allowing the last two input bits to control the decoder enable. The 2 to 4 decoder also features an enable pin for the option of disabling all animation during the table operation.

The truth table for the superficial 5 to 32 decoder is as follows:

For Each 3 to 8 Decoder

MCU output

Decoder output. Each Decoder will have the same output. They will vary based on the MCUs last 2 pins (3&4) The truth table will be modified by n depending on which of the four decoders is enabled. If 3&4 pin out is 00, n=0; 01, n=1; 10, n=2; 11, n=3.

Pins 0-2

LED(1+8n)

LED(2+8n)

LED(3+8n)

LED(4+8n)

LED(5+8n)

LED(6+8n)

LED(7+8n)

LED(8[1+n])

0 0 0 ON Off Off Off Off Off Off Off0 0 1 Off ON Off Off Off Off Off Off0 1 0 Off Off ON Off Off Off Off Off0 1 1 Off Off Off ON Off Off Off Off1 0 0 Off Off Off Off ON Off Off Off1 0 1 Off Off Off Off Off ON Off Off1 1 0 Off Off Off Off Off Off ON Off1 1 1 Off Off Off Off Off Off Off ON

Table 2: Decoder Truth Table

The Decoders are be capable of the following specifications:

Supplied Voltage:3.3-5V Output current: 20ma Switching Speed (min): 1kHz

The decoders were also active high and the four 3to8 decoders must had an enable input. The selected 3 to 8 decoder is the CD74HC238. It is an active high, high-speed 3 to 8 decoder with enable logic. The following subject specifications are as follows:

DC supply voltage: 2V to 6V DC input current: 50ma DC output current per output pin=25ma Output voltage: 2V to 6V

71

Page 80:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

Rise and fall time:

2V 1000ns Max 1MHz switching speed

4.5V 500ns Max 2MHz Switching speed

6V 400ns Max 2.5MHz switching speed

Table 3: Decoder Voltage and Rise/Fall Time

Each output of the decoders go to a circuit of multiple LEDs. This setup allowed for a larger array of LEDs for animation.  The Specifications for the LEDs is as follows:

Voltage Range:1.5-6V Current no greater than: 50ma 5mm in diameter. Viewable angle greater than 60 degrees

The typical 5mm typical round plastic bulb light LED was chosen. They were straw hat, or wide angle LEDs. Their specifications are as follows:

Forward voltage (min): 3v Forward voltage (typical):3.2 Forward Current (rated) : 20ma Maximum Reverse Bias Voltage: 5V Maximum Reverse Bias Current: 40uA

Because the LEDS have a voltage difference of 2 volts in between the forward bias and reverse bias voltages, it is possible to Charlieplex the diodes. Charlieplexing is connecting two diodes in parallel, but in opposite direction. This method allows for two diodes to be controlled exclusively with only one circuit. Figure 39 below shows the schematic of Charlieplexing.

Figure 39: Charlieplexing Illustration

Charlieplexing effectively doubles the number of diodes in a circuit, however, the unit driving the two diodes must be capable of reversing the voltage between the

72

Page 81:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

two terminals of the circuit. The current design using the multiple decoders would require more hardware to accommodate the reverse bias feature than if to add extra decoders to expand the output of LEDs to the equivalent number. Each circuit of diodes is connected in parallel with one resistor to govern a safe voltage and current for the diodes to operate and a transistor receiving it’s base voltage and current from the output of the decoder.  To maintain the logic convention previously specified, NPN transistors were selected to drive the diode circuits. The transistors must meet the following specifications:

Current gain >50 Maximum Collector Emitter Voltage (min): 15V (=12V+25%) MinimumCollector Current: 160ma (enough) to supply all diodes in circuit. Switching speed minimum:1kHz Minimum power dissipation: 720mW

It was important that the transistors are capable of meeting all the minimum specifications in order for the decoder design to be able to power all of the diodes in the circuit sufficiently as well as meet the flicker fusion threshold frequency needed to attain the allusion of constant illumination. The chosen transistor to meet the specifications is the 2N4401 NPN General purpose transistor. It’s specifications in question are as follows:

Switching speed: 250MHz Continuous collector current maximum: 600mA Maximum collector emitter voltage: 40V Maximum Emitter Base Voltage: 6V Maximum Collector Base Voltage: 60V Power Dissipation: 1.8W

Figure 40 below is a simulation of the described design.

In this simulation, J1 is the switch simulating the decoder output. The output voltage is capable of falling in between 2V and 6V, but the design will consist of a 5 Volts supplied to the decoder which results in a 5 volt output from the decoders. Q1 is the transistor that is driving the current for the diodes. R1 is the resistor. Depending the amount of current and voltage needed for the diode array. This will vary based on how many diodes are in parallel. The 2N4401 transistor is rated to drive up to 600mA continuously which means we could in theory drive 30 diodes in parallel. The resistance of the diodes is considerably small and can be neglected for calculating the resistance of R1 in the circuit. Resistance can be calculated from the following equation:

R1 (Ω )= 5V¿of diodes∗20mA

The design is laid out in 3 separate boards. The boards were initially to be designed using Sunstone Circuits ® PCB123 Design software. After pricing the printed circuit boards, it was found to be outside of the group's budget, and it was

73

Page 82:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

decided to create their own boards. One board contains the microcontroller and the decoders. This board will be referred to as the main board. The main board has two wire channel locks to connect the animation sequence control signal inputs to the board. The channel locks have their leads connected via PCB to the microcontroller I/O pins designated for animation sequence control. The output of the microcontroller is connected to the input of the decoders. The microcontroller is connected to the board through a 14 pin socket so it can be removed and reprogrammed if necessary.

Figure 40: Aesthetic LED Control Schematic

In the Figure 41, the preliminary main board layout is pictured. All chips shown are dual inline packaged chips. Each chip is a 16 pin package and measure approximately 1 inch long. There are no power or ground leads shown. Pictured are the leads on the board for lines of logic. In this current diagram, no power supply lines, leads or grounds are shown. The through hole soldering leads for external wiring is also shown. These holes appear in the figure as blue dots. The two lines in the upper left hand corner in red are the input lines from the lighting animation control signal. They lead into the microcontroller. The two red leads directly below P1.0 and P1.1 are two of the 5 pin output of the microcontroller going to the 2 to 4 decoder. The tan colored lead to the left of the 2 to 4 decoder is the enable line for the 2 to for decoder. This enable line is attached off of the printed circuit board to two switches in series for both teams to have the ability to disable the lighting animation sequences without restarting the microcontroller. However, in the event the microcontroller is no longer functioning properly or

74

Page 83:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

found unresponsive, reset will be available through push buttons wired to the board. The red, green and blue leads crossing through the center of the board represent P1.2 P1.3 and P1.4, the other three control lines on the MSP430G2553 microcontroller. The tan lines connected in between the 3 to 8 decoders and the 2 to 4 decoder represent the outputs of the 2 to 4 decoder going to the enable line of the 3 to 8 decoders allowing the 8 unique outputs to become 4. The blue dots located in close proximity of the 3 to 8 decoders are the through holes for wires to be soldered into. These are the outputs of the decoder going to the boards for driving the diodes.

Figure 41: Main Animation Board Illustration

The second board contains the transistors responsible for driving the diode circuits. The board also have wire buses that connect multiple leads, 12 total, to the transistor’s collector. The board has carbon film resistors. The resistance is calculated for 12 diodes to be powered with sufficient current. A total of 30 resistors and 30 transistors are included between the diode driving boards. This board is responsible for relaying power to the diodes.

Figure 42 is the preliminary design for the diode driving board. The white triangles represent the transistors. The brown corndogs represent the resistors, and the white rectangles with violet dots represent wire busses. The violet dots shown at the bottom of the printed circuit board in the diagram are the 5 volt input lines from the decoders. There are 16 on each board totaling 32 between the two boards for Region1 and Region 2. These violet dots are through-hole solder points for wires. They are connected by leads in the printed circuit board represented in blue lines to the base node of the transistor. The green line represents a parallel bus line for all of the transistors to use for their emitter nodes. These are the current sink for all of the circuits. They all share a common ground. This ground runs through a printed circuit board lead over to a through hole solder point for a ground wire to be connected. The collectors of transistors

75

Page 84:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

are singly connected to their own respective resistors by a printed circuit board lead shown in red. The other nodes of the resistors are connected to large contact pads through printed circuit board leads shown in red. These contact pads are the wire busses that will connect to multiple diodes. Each wire bus connects each of its 12 outputs to 12 different diode housing boards.

Figure 42: Aesthetic LED Control Illustration

The third board contains the housing for the diodes as well as the PCB responsible for their electrical connection. The housing for the diode will be 1cm tall by 1 cm wide and 1 foot long. These are predrilled holes, 5mm in diameter. These predrilled holes will hold the diodes securely and below the level of its surface allowing it to be safely mounted to the acrylic. Underneath, mounted to diode housing is the circuit board. Attached to the board is  a power rail to decrease the number of wires attached to the printed circuit board. This minimizes user error and clutter around the circuit board. The only leads from the diode board are the connection from the diodes cathode to the resistor on the transistor diode driving printed circuit board. The positive bus is connected to the main system power source and to the anode of the diodes. The diode housing board will be the only board actually being part of the table.

Figure 43 shows the design of the diode housing board. The diode housing board is mounted beneath clear and colorless acrylic. The blue lobes and circles represent the Light Emitting Diodes in both diagrams. The diodes are measured with a diameter of 5mm and a height of roughly 8mm. The banana cream colored block represents the plastic housing that the diodes will be seated inside. Attached underneath the diodes will be the printed circuit board. The circuit board contains 16 diodes total, diodes (0 through F).

The far left purple dot in the bottom view diagram is the through-hole solder point that the wire connection for the 5 volt positive power supply  feeds the diodes. The purple dots featured at the bottom of the circuit board represent the through-

76

Page 85:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

hole solder point for the wire to connect each diodes cathode electrically to individual wire bus connections. Each board is 1 foot long.

Figure 43: Aesthetic LED Placement Diagram

These boards are  placed around the perimeter of the regions 1 and 2. The main board is located in region 0 to one side in between region 1 and region 2. Figure 44 contains examples of the diode driving boards and the diode housing boards’ connections. Also displayed in that figure are the other all layout of the light animation system.

Half of the decoder outputs are used for Region 1 and the other half of the decoder outputs will be used for Region 2. Region 1 have outputs 0-15 and Region 2 has outs 16-31. Each Decoder output drives one 2N4401 NPN transistor connected to a circuit of 12 parallel LED diodes and one transistor. Each transistor is capable of delivering 600mA of current. Each circuit of LEDs will require 160mA. One transistor is enough to suffice the needs for driving each diode circuit.  The resistor value to deliver 15mA to each diode is 18.54. The closest produced resistor with equal or higher value, so we don’t burn out our resistors with too much voltage or current, is 20 Ohms. It is possible to create the optimal resistance but that would require making a matrix of resistors in parallel or in series, which increases our overall area for the circuit board. Each side of the perimeter of Region 1 and Region 2 contains two identical outputs from that Regions total decoder output pins. Each Region is assigned 16 decoder outputs total. In total, each side has a total of 30 diodes equally spaced throughout side of the perimeter. The sequence in which the outputs of the diodes are electrically connected are also kept in the same order throughout all 4 sides of the Region’s perimeter without using the same output again before all of the other diodes have been placed on the perimeter.

77

Page 86:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

Figure 44: Aesthetic LED Wiring Diagram

Figure 45: LED Perimeter Configuration

78

Page 87:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

In order to achieve equal spacing, each diode will be spaced .75 inches, or 20mm apart center to center from each other.

The microcontroller is responsible for taking in two signals from 2 input pins and creating the 5 pin signal output for the decoders. The MSP430G2553 was tje selected microcontroller. The MSP430G2553 is part of Texas Instruments’ MSP430 Value Line microcontroller product line. This microcontroller has easy programmability because the 430G2 Value line series contains a launchpad development toolkit. This kit is capable of programming the microcontroller through a JTAG bootloader built in, controlled through a computer based program via USB. The computer program allows the user to program in the language C or in assembly. The development kit also includes the MSP430G2553 microcontroller, making it an economically superior choice. The MSP430G2 Series operates under the following conditions:

Supplied Operating Voltage: 1.8-3.6V Digital (I/O) pins: 9 Memory: 2kB Flash Clock frequency: 16MHz

In the design, 2 of the microcontrollers I/O pins will be used as inputs to determine what animation sequence to execute. The pins on the MSP430G2231 available for I/O usage in the DIP package are 2,3,4,5,6,7,8,9,12,13. Pins 8 and 9 which are P1.6 and P1.7 respectively are used for input of the animation sequence control signal. P1.6 is the LSB and P1.7 is the MSB). The output pins for the decoders were 2, 3, 4,5,6 which are P1.0, P1.1, P1.2, P1.3, and P1.4 respectively. P1.0 is the least significant bit and P1.4 is the most significant bit. This arrangement was chosen because the Dual Inline Package form of the MSP430G2553 microcontroller has both pins 8 and 9 on opposite side of the chip that pins 2-7 because it is a 14 pin package chip. In order to keep a simple design, all input signals were placed on one side of the microcontroller and all output signals were placed on the opposing side of the chip. This helps with the layout design on the circuit board with the microcontroller and decoders.  

Pin Value (MSB,LSB) 0 1=5V

0 (0,0)Random (0,1)=Team 1 encircle

1=5V (1,0)=Team 2 encircle

(1,1)=Halt Flash

Table 4: Animation Truth Table

For better understanding of the animations animation, diagrams will be used to illustrate the patterns being executed. The horizontal axis will represent the diodes 0 through F on each side of the perimeter. The diagram will not contain both sets of diodes 0 through F that run per side, only one set.  The time scale

79

Page 88:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

will be the vertical axis of the diagram. The time scale has no unit unless specified.

In the microcontroller, the main loop checks to see the status of the two animation control input signals. If both are zero, then the microcontroller begins to run the random animation sequence. The default sequence uses a modulo operation to select it’s subsequence and the number of cycles for the subsequence not to exceed 10 cycles. The Random Sequence is a group of smaller sequences that will be run continuously without delay until the animation control signals change. The microcontroller will enter the subsequence loop in the program which will consist of instructions in a while loop format. Before the subsequence loop runs, there will be a predetermined number of cycles that will be execute stored inside of a variable outside of the loop for termination of the subsequence loop once it’s ran to its duration. The sequence loop will be 1 cycle long. After every completion of the subsequence cycle, the variable containing the number of loops to be executed is decremented. Once the loop counter variable has reached zero, a branch if zero instruction is executed to exit the loop. The first subsequence of the random sequence is the Rock. The Rock has lights alternate from one end of the array to the other end of the array continuously. The Rock takes will take 1 second to complete a full cycle. A full cycle is from the beginning diode 0 consectuively powering on and off every diode to F. Once at diode F the microcontroller will being powering on and off every diode consecutively down back to the orginal 0 diode. This completes one full cycle of the Rock.The microcontroller’s subsequence will start by activating the first diode for a period of time equal to 1/32 of a second. To power on the diode, the microcontroller will output the correct logic to the 5 pins neccesary for the decoder to provide the specified output. The program will run the instructions for outputting the diode pattern, the subsequence will then decrement the loop termination variable. The while loop will continue to run until the loop termination value is zero. The Rock animation diagram is illustrated in Figure 46.

The second sequence embedded in the random sequence is Bounce. Bounce runs at the same frequency of 1 Hz. The Bounce sequence starts with the inside diodes (7&8) and powers on and off the adjacent diodes i.e. (6&9) then (5&A) and so on. Once the Diodes 0 & F are powered on and off, the sequence will begin to power on and off towards the original diodes completing the cycle at diode 7 & 8. The microcontroller program will run very similar to the rock animation subsequence, but with a different order to the diodes lighting sequence. An animation diagram is shown in Figure 47.

The third sequence in the Random animation is the Roll sequence. The Roll sequence runs at a full cycle of 1 second. The roll sequence starts at the two ending diodes 0 and F. Diodes 0 and F powered on, but unlike the other two subsequences, the roll sequence does not power off the diode. The next adjacent diode is then powered on and continues until the diodes 7 and 8 are powered on. Once this point is reached, the diodes 7 and 8 will both be powered off. Directly after that, the adjacent diodes will then power off until the diodes 0

80

Page 89:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

and F are reached. The microcontroller’s program will run differently than the first two subsequences. For this subsequence to work, the microcontroller will have to alternate it’s outputs to emulate constant lighting from all of the diodes since the decoder is only capable of only have on output supplied at a time. The program will start by powering on and off the diode 0 at a frequency of 1kHz. In order to simplify the constant diode lighting code, an embedded for loop will run for each portion of the subsequence. When the second diode powers on, an embedded for loop containing both the 0 diode, the 1 diode, the F diode, and E diode will continuously loop for a specified period of time at a frequency of 1kHz. Every time another light is added for the following portion of the subsequence a new embedded for loop will run containing the new diode with the embedded for loop executing in 1millisecond. Once the diodes 7 and 8 are reached, the program will then reverse through the embedded subsequence for loops until the original diodes 0 and F code is running. The program will then decrement the loop termination variable. The animation diagram of the Roll subsequence is shown in Figure 48.

Figure 46: Rock Figure 47: Bounce Figure 48: Roll

The final subsequence of the random animation sequence is the skate subsequence. The skate subsequence will consist of a pattern of lights powering on and off out of order, but in groups of diodes that aren’t adjacent to each other. The pattern will run for one cycle. The full cycle in this subsequence will have duration of one code loop no longer than 1 second. The subsequence will start with diodes 2, 5, 8, B, D. The pattern will then power off those diodes and power on the next diodes, 1, 4, 9, A, E. The pattern will end at the end of the code loop to complete one cycle. The microcontroller will implement this in code by using embedded for loops similar to the roll subsequence. Depending on the requested decoder inputs of the user. The microcontroller will loop through the diode outputs at a frequency of 1kHz for a total duration of roughly 1/16 of a second. The microcontroller will then execute the next embedded for loop powering on and off a different specified group of diodes. After the program has executed all 16 embedded for loops inside the subsequence, a full cycle is completed. The animation diagram for the skate subsequence in the random animation sequence is shown in Figure 49. That completes all of the subsequences in the animation sequence Random.

81

Page 90:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

The next sequence is the Team 1 encircle sequence. While the microcontroller is in operation, it will constantly check the status of the two animation control input signals. If the animation control signals are MSB=0, LSB=1. Then the microcontroller will jump into the Team 1 encircle sequence. The team 1 encircle sequence simulates a rotating ring of lights around the perimeter of region 1. There will be no animation in region 2 or region 0. The ring will have 8 diodes running simultaneously during the entire duration of the Team 1 encircle sequence. An entire revolution around perimeter of the region will take 4 seconds. Each diode cluster defined by the adjacent diodes 0 through F will run for a total of 0.5 seconds per cycle. This will give each side a total of 2 cycles equivalent to 1 second. All four sides of the region will total an operation time agreeing with the previous revolution time.  The pattern will start with the diode 0 powering on and off and then the next adjacent diode in the cluster will power on and off. This pattern will continue until the diode F is reached. Once the diode F is reached the pattern will repeat itself. Each light will be powered on for 1/32 of a second. This loop will run until the microcontroll receives a different input on the animation control signal inputs. The microcontroller will implement this program with one while loop. The loop will contain the sequence pattern with delays to create the specified timing needed for the pattern. The animation diagram for the Team 1 encircle is shown in Figure 50.

Another sequence programmed into the microcontroller is Team 2 encircle animation sequence. If the microcontroller is running and the animation control signal inputs are MSB=1, LSB=0, then the microcontroller will execute the animation sequence Team 2 encircle. The Team 2 encircle animation sequence is the same as the Team 1 encircle animation sequence. The only difference between the two animation sequences is the region they operate in. Team 2 encircle animation sequence only operates in region 2. The Team 2 encircle animation sequence also operates in the same clockwise direction around the perimeter of region 2. The animation diagram shown for Team 1 encircle animation sequence shown in Figure 52 can also be used for referenece for Team 2 encircle animation sequence.

While the microcontroller is operating, if the animation control lines become MSB=1, LSB=1, then the microcontroller will execute the Halt flash animation sequence. The Halt Flash animation sequence will run inside both region 1 and region 2. During the Halt Flash animation sequence, all of the diodes will appear to be operating together to create one lighted perimeter around both region 1 and region 2 for a total of 1 second. The Halt Flash animation sequence will toggle in between all of the diodes active and all the diodes off with each having duration of 1 second.  The microcontroller will execute the following with a coded while loop. The loop will power on and off every diode output by cycling through all 32 combinations of the 5 pin decoder input. The microcontroller will run this cycle at 1kHz. This program will continue operation until the animation control signal inputs are no longer MSB=1, LSB=1. The animation diagram for the Halt Flash animation sequence is shown in Figure 51.

82

Page 91:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

Figure 49: Scatter     Figure 50: Circle Figure 51: Halt Flash

4.3.4 Cup SensorsEach cup sensor unit combines the capacitive touch unit, used to detect the presence of a full cup, with five RGB LEDs and the TI TLC5940 LED driver, as depicted in Figure 52. Each unit is connected to a MSP430 which controls the functionality of each cup sensor. The MSP430 interprets the capacitive touch data and relays it as game state data to the central control unit.

Figure 52: Cup sensor block diagram

At the beginning of each game, each of the six cup sensors on each side of the table is initialized to display a different color. Players on either side of the table

83

Page 92:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

select their team color by placing a cup on one of the cup sensors, and filling said cup. Once the system detects a change in capacitance of the cup being filled, all cup sensors on that team's side of the table are set to display the selected color. The MSP430 on that side of the table then signals the central control unit with a ready to start game message. Once both sides of the table are ready, the game can begin. The activity diagram in Figure 53 illustrates this process.

Once the game has begun, the MSP430s on each side of the table continuously monitors the capacitance values of their six respective capacitive touch sensors. When a ball is made into a cup, the player on the side of the table where the cup is removes the cup. This changes the capacitance of the sensor at that position. Upon detecting this change, the MSP430 notifies the TLC5940 connected to that cup sensor to turn off its respective LEDs. Finally the MSP430 notifies the central controller of the removal of the cup, updating the current game state data. The MSP430 then goes back to reading the capacitive touch sensor values, waiting for another cup to be removed. When the last cup on either side of the table is removed, the LEDs for that cup sensor are turned off, and the MSP430 notifies the central controller that the game is over. The activity diagram in Figure 54 illustrates this process.

Figure 53: Beginning of game/team selection sequence diagram

84

Page 93:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

To make the entire table as universal as possible, standard size disposable plastic cups are used to hold beer. Coincidentally, the Texas Instruments capacitive touch unit is the same size as the bottoms of said cups. This allowed for LEDs to be placed around the capacitive touch unit in a circle with a circumference slightly larger than that of the cups. The layout of the unit is illustrated in Figure 55.

Figure 54: Cup sensor subsystem game behavior sequence diagram

For each capacitive touch unit, only a single port is required to read the charge/discharge cycle counts which determine the presence of a cup. As such, all six sensors on one side of the table are connected to a single MSP430. The MSP430 continuously measures the capacitance of each unit, in order to keep the central controller updated with current game state data.

85

Page 94:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

Figure 55: Cup sensor unit layout

The code to measure the capacitance of each unit is relatively simple. This application of the Texas Instruments capacitive touch unit makes use of the RO (relaxed oscillator) method of capacitance measurement. This allowed the measurements to occur without using much CPU power, due to the high frequency of charge/discharge cycles compared to the frequency of the CPU. A interrupt timer is used to activate the measurement of the capacitance of the capacitive touch unit. As it takes approximately a whole second to remove a cup from the cup sensor unit, the interrupt need only trigger once a second, or even less. Once the interrupt has been triggered, the interrupt service routine measures the capacitance of each cup sensor for a fraction of a second, and compares that number of charge/discharge cycles with the previous count of cycles. If the change is above a certain threshold, approximately two thousand cycles (much higher than the change in cycles due to environmental noise), the system interprets this as a change in the presence of the cup at the sensor being measured. If any changes in the presence of cups are measured, the routine sends a bit stream to the LED driver of that sensor to turn off the LEDs, as well as notifies the central controller of the update to the game state.

Designing the system without the use of some advanced or specialized integrated circuit proved to be extremely difficult. In order to fit six cup sensors in the relatively small space of the cup area (a triangle, one foot long on each side), and still have the rims of each adjacent cup touching when they are in the play area, each unit had to have a diameter less than or equal to the maximum diameter of 3.875". This meant all the circuitry for each unit had to also fit into this small area, unless the controlling circuitry was made remote from the unit

86

Page 95:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

using ribbon cable or some other form of path bus, which would have complicated the entire system design even more.

On top of this limitation, there is also the issue of limited input/output pins available on each MSP430. Even if one of the largest DIP package of the MSP430 (20 pins) had been chosen, the number of available pins would have still been too few to realize the schematic in Figure 56. If this design were to be used, each cup sensor unit would have required its own MSP430, as there are no MSP430 packages with the ninety six pins required to drive ninety LEDs and read values of six capacitive touch units (as shown in Figure 56). Adding to the complexity of this design, a large amount of tuning/calculation would have been required to bias each photo diode effectively in order to mitigate intensity variation and generate consistent and vibrant colors.

Figure 56: Direct control of cup sensors with MSP430 wiring diagram for one side of table

Due to these limitations, it was decided that Dot Correction would be necessary. Therefore the five RGB LEDs on each cup sensor unit are be driven by a single Texas Instruments TLC5940. Because the TLC5940 is a current sink, all the LEDs are of common anode configuration. The anode of each LED is connected to a common voltage supply for all the LEDs. Each cathode of each LED is connected to a separate pin of the TLC5940. As there are five LEDs per cup sensor unit, fifteen output pins of the TLC5940 are used, with one remaining.

87

Page 96:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

A RGB LED was acquired to prototype the above design shown in Figure 56. For this test LED, the current requirements were 30mA for green and blue, and 50mA for red. In order to supply the required current for each color, without blowing out another color, dot correction was used on each pin. This type of LED required an external resistor of value 780Ω to set the maximum current IMAX to 50mA. The calculation is shown below.

R IREF=1.24V.05 A

∗31.5=781.2Ω

Another benefit of using the TLC5940 is its grayscale PWM capability. In order to make blinking and fading animations, grayscale values for each pin are transmitted to the chip from the MSP430 controlling it. Pulse width modulation on the TLC5940 is controlled by a twelve bit word for each output pin, allowing for 4096 brightness steps, ranging from 0% to 100% brightness

Because not all the functions of the TLC5940 were used in this application, some pins of the chip did not need to be connected to the MSP430. The layout illustrated in Figure 57 was used.

A single output pin of the MSP430 functions as the serial communications clock (SLCK) which is shared among all cup sensors. Both grayscale and dot correction values are transferred through serial communication, and the desired update rate of the LEDs is 100Hz. Thusly, the frequency of the SLCK will need to be 28.8kHz.

f SCLK=16 pins∗(12bits+6bits)∗100Hz=28800Hz

Another output pin of the MSP430 will function as the grayscale clock. It will function at a frequency of 409.6kHz.

f GSCLK=4096 grayscale values∗100Hz=409600Hz

88

Page 97:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

Figure 57: Cup sensor subsystem wiring diagram for one side of table

4.3.5 Light BarrierDue to the complexity of the requirements of the barrier, multiple design approaches were developed, in an attempt to overcome as many of the hurdles imposed by the design problem as possible. Prototyping and early testing determined which design was chosen for the final version of the DCPPTSS, this design being the Discretizing Laser Array.

One limiting factor in the design of the light barrier is known as the Nyquist Sampling Theorem. The Nyquist Theorem states that an analog signal may be fully reconstructed from sampled data if and only if the sampling frequency is at least twice the frequency of the signal frequency. This theorem can be extrapolated to the light barrier application. In order to be sure a measured interruption of the barrier is valid, and not simply some form of noise or

89

Page 98:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

interference, at least two emitter/detector pairs must lie within a distance equal to the diameter of the ping pong ball (for the purpose of this document, the diameter of a ping pong ball will be assumed to be forty millimeters), as this is the smallest diameter object expected to pass through the barrier in any circumstance.

Single Sided Plane - The single sided plane design was the first theorized design which satisfied all the requirements. In this design, the emitter/detector pairs would have lain within the same unit. The emitters for this application would need a long enough range to reach from the surface of the table to the standard height of a room ceiling (between ten to twelve feet); with the emitted light remaining intense enough to be reflected back down to the detectors embedded in the unit by any object which enters the plane.

As stated earlier, theoretically, there must be at least two emitter/detector pairs within a distance of forty four millimeters. This means there must lay fourteen pairs per foot.

1 ft=304.8mm

304.8/ 44=6.927

The barrier unit would lie within the plane of the DCPPTSS, in order to be as unobtrusive to the game as possible. The unit would have a length equal to the width of the table, and a width of between one half to one and one half inches, depending on the dimensions of the emitters and detectors embedded within it, and the space required for PCB traces. Emitters and detectors would be arranged within the unit in alternating pairs, in order to maximize the chances of detecting an object. See Figures 58 and 59 below for a visual aid.

Figure 58: Layout of emitters and detectors in single sided design

The circuitry for the configuration above could be realized in many different ways. Depending on if ambient light filtering is used, and how detection is actually measured, the circuit elements could be radically different. In one possible configuration, the output of each detector would be compared against a threshold voltage using a comparator. The output from each of these comparators would then be ANDed with the output from the comparator of the detector on its left, as well as the output of the detector on its right. The outputs of all these ANDing

90

Page 99:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

operations would then be ORed, creating the final output. This realization is illustrated in Figure 59.

Figure 59: Custom object detection circuit for single sided design

In this configuration, it is assumed that if a ball passes through the barrier, it would be detected by two adjacent detectors at the same time. If ambient light filtering is desired, the output of the emitters could be modulated by running each of them in series with a properly biased Bipolar Junction Transistor (BJT) or Metal Oxide Substrate Field Effect Transistor (MOSFET). The output of each detector would then also be filtered using the method described in the research section 3.2.7. The drawback to using a pulsed output is it requires more circuit elements. As the power supply for the DCPPTSS is a normal direct current power supply, the voltage input to these transistors driving the emitters would need to be modulated by some integrated circuit capable of Pulse Width Modulation.

This barrier design is the one that could benefit most from driving the emitters with a square wave, as described in the research section 3.2.7. Using this method would allow the barrier to operate over a much larger height by increasing the distance the infrared light travels. This increase in barrier area could make the difference between being capable of detecting objects passing through the single sided barrier all the way up to the ceiling of the room housing the DCPPTSS; and not being able to detect the object at all. The second benefit is that it would also increase the chance of correctly detecting an object passing

91

Page 100:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

through the single sided barrier in general. With more infrared light being emitted, it would increases the amount of light which can be reflected off the object and sent back towards the detectors. This method would also raise the threshold voltage the comparators would need to be set to, as the voltage across the detector would be larger with more current passing through it. Increasing this threshold would decrease the chances of incorrectly detecting an object due to noise, ambient infrared light, or some other environmental factor.

Emitter/Detector Rail Pairs - The single sided rail configuration described above suffers from some problems. Being single sided; it relies on the reflection of infrared light off an object in order to measure the presence of an object in the barrier. If the level of reflected infrared light is too low, if the infrared light which is reflected is reflected at an angle away from the detectors, or if only a single detector detects the presence of a ball passing through the barrier, that barrier will not correctly interpret the data.

These issues could be resolved in an easy fashion. In most of today’s applications of infrared barrier technology, there are two sides to the barrier, as described by the garage door opener unit in the research section of this document, and illustrated in Figure 60. On one side of the barrier lies the emitter and, across a distance, on the other side is the detector. The same idea can be used in this barrier application. By using two rails, instead of just one, with each containing only emitters or only detectors, the problem of relying on reflection is eliminated.

Using this configuration, in the normal state, emitters are always shining on the detectors, resulting in a low output voltage from each detector. This voltage will remain relatively constant as long as nothing passes through the barrier. When an object passes through the barrier, the object will block the infrared light of the emitters from reaching the detectors. This results in a higher output voltage measured across the detectors.

Figure 60: Emitter/detector rail pair design illustration

92

Page 101:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

The drawback to this design however, is that the design violates one of the main objectives of the unit. In the optimum design, the unit is completely unobtrusive to game play. Using two rails would have ben rather obtrusive to the actual game play. The rails would have had to be mounted vertically on the sides of the table. In this configuration, the rails could possibly have become pillars for the ball to hit and ricochet off of.

Discretized Table Array - The final design, and the one which was chosen to be implemented, was a compromise between the two designs, single sided rail, and rail pairs, described above. In the discretized table design, illustrated in Figure 61, there are six rails running along the edges of the DCPPTSS surface. These rails protrude approximately six inches from the surface of the table; this way the barrier exists in a plane just above the rims of the cups used to play the game. The rails have a width of one half inch. Each of these rails is set up much in the same way as the emitter/detector rail pairs described earlier. For each dimension of the table (length and width), the rails running parallel to each other work exactly as the rail pairs from above do; emitters always shining on the detectors, and the system detecting objects passing through the barrier by the lack of illumination of the detectors.

Figure 61: Discretized table design illustration (Perspective not accurate to dimensions)

Using this configuration, the table surface is discretized into measurable units, much like a Cartesian plane. When a ball is thrown by a player, as long as it actually hits the table, the system is able to determine the exact position on the table where said ball landed. This is achieved by knowing the location of the detector(s) which measured the presence of an object, in both dimensions (X and Y). The intersection of the rays which can be imaginarily drawn across each pair of emitters and detectors coincides with the position in which the ball crossed the barrier.

This design does have its own drawbacks however. If a player whiffs a ball, and the ball never actually touches the table, the light barrier system has no way of determining this. In this configuration, the system relies solely on the players of

93

Page 102:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

the game to notify the system, either through the user interface or in some other fashion, that the shot was a miss.

The photodiodes used in the discretizing array are biased using 5V. For the emitter detector pairs spanning the 8’ length, three 8:1 analog multiplexers are used to decrease the number of input pins required on the MSP430G2553. When the laser is unblocked by an object, the output of the multiplexer is around 5.6V. The outputs of the multiplexers are driven through a voltage divider using two 300kΩ resistors, in order to bring the voltage down to microcontroller levels, with the output of the divider connected to the MSP430. Each short emitter detector pair is driven into a 16:1 multiplexer, and connected to the MSP430, in the same fashion. As there is only one comparator on the MSP430G2553, the 5 multiplexer inputs are also multiplexed in software, in order to feed each input through the comparator.

In all the preceding designs, the barriers function in a very similar fashion to determine a hit from a miss. For the designs in which there are two planes of light (Single Sided and Rail Pair), when the system detects an object passing through the front barrier (the barrier closest to the middle of the table), it would then attempt to detect the object passing through the rear barrier within a small period of time which is determined and refined during the testing phase. If the object is detected passing through the rear barrier during that time period, the shot would be determined to be a miss. If the object is not detected by the rear barrier, the system would assume the ball must have landed in a cup, and label the shot a hit.

Distinguishing a hit from a miss in the discretized table design works in the same way, except with only one plane. When a ball is thrown, the system tries to detect where it crossed the plane. It then attempts to detect the object passing through the plane again within a period of time. If the object is detected a second time, it is assumed the ball bounced off of the surface, which implies a missed shot. This design does have one advantage over the others in that the exact location of the object passing through the barrier, in both dimensions, is able to be determined. Because of this, entire areas/sections of the table are programmed as “miss” areas, requiring less calculation and measurement.

The code for the detection process is relatively simple. Voltage across the voltage divider of each multiplexer will go from high to low only when there is an object blocking the laser of the selected multiplexer line. The MSP continuously scans through all emitter detector pairs. If the voltage is low, the algorithm increments an internal counter for that detector. If the voltage is high, the algorithm checks the value of the counter, and if it is above zero, the ball determines if a ball or a hand passed through the barrier. This is done by checking the accumulated value against a threshold value of 53. If it is below, a ball passed through the barrier, if it was above, it was a hand.

94

Page 103:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

4.3.6 Ball WasherThe size of the reservoir had to be minimum 3 times the size of the of two ball wash units to ensure that the total volume of water inside of the reservoir could hold everything inside the ball washers and still keep the pump safely submerged, as well as contain all the water inside of the entire system when the table is not powered.

The pump and UV sterilizer are to separate units. The pump feeds water to the sterilizer via vinyl tubing. The vinyl tubing is ½ inch in diameter and is secured to the table with duct strapping. The vinyl tubing is connected to the ball collection reservoir about half way up the structure, to supply circulating water. The water is then forced out the bottom of the cup by only gravity. The UV sterilizer uses a fluorescent tube at a wavelength of 265 nanometers. The pump has a flow rate of 200 gallons per hour. The pump operates on 120 VAC power supplied from mains wall power. This was done to minimize area taken under the table. The pump is enclosed inside of the water reservoir. The water reservoir is located under the table in the center next to the main power supply unit. The water reservoir is secured to the frame of the table using duct strapping. The water reservoir is made of PVC tubing. The water reservoir system contains a large diameter lid through which the power cables for the water pump system are run. The dimensions of the water reservoir are 8 inches long with a diameter of 4 inches. The drain for the reservoir will be a simple butterfly valve made of PVC for emptying the water out of the water circulation system. All this is illustrated in Figure 63.

Figure 62: Ball Washer Reservoir

95

Page 104:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

The ball wash reservoirs are made of 4 inch to 2 inch PVC reducers. The layout of the inlet and outlet are displayed in Figure 64. The drainage pipe is some more of the vinyl tubing discussed earlier. The ball wash reservoir is mounted and sealed directly to the acrylic board. The vinyl tubing consist of 2 runs of 4 feet with one 90 degree bends. A ball valve is connected in line with the inlet, in order to control the flow rate. The layout of the system in relation to the table is illustrated in Figure 65.

Figure 63: Ball Washer Illustration

Figure 64: Ball Washer Layout Illustration

96

Page 105:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

Leak test were performed by assembling the entire circulation piping system and reservoirs. The reservoirs was assembled by use of silicone sealant for the water reservoir and PVC cement and primer for the PVC piping on the return line and ball collection reservoir. The entire system sat for a total of 3 hours to look for signs of any stray moisture.

4.3.7 PowerThe power supply system consisted of the main power supply unit and all buses, cables, and wires responsible for delivering power to the different subsystems involved inside of the entire design. The specifications for the main power supply unit are as follows:

Power delivered at 120VAC, 12VDC, 5VDC, 3.3VDC Able to run continually for a period of continuous operation at systems

maximum current rating for over 6 hours. Equipped with functional unlimited use surge protection system & Ground

fault Interuption Intake power from a 120VAC 60Hz

The main power supply was only responsible for taking in power from a mains source of 120VAC 60Hz and safely converting it into many rails of other voltages mentioned above. When considering the specifications of the described power supply unit, instead of building a power supply unit, it was determined more desirably to purchase a pre-engineered power supply unit. A pre-engineered power supply unit already has been tested for safety hazards, is designed spatially compact, built to operate at safe temperatures for extended periods of time, and can be selected to meet exact specifications to minimize design and testing efforts on the power supply unit. To incorporate different voltage levels without multiple power supply units, a computer power supply was chosen as the main power supply unit. An ATX PSU can be tailored to supply the rated current for each of the supply rails without purchasing a unit that is over designed for necessary values. A PSU is also capable running without limit on operation hours and features extremely stable voltage levels.

The computer power supply diagram is featured in Figure 66. The power supply takes in power from an electrical socket. The power plug accepting mains power from an electrical socket is shown on the left side of the illustration. The black wire is known as the “hot” wire. The hot wire actually carries live voltage on the power cable from the main distribution board. The white wire is known as the neutral. The neutral line is the other half of the power circuit. The green is a ground used for safety projection. The orange wire is the 3V line. The 5V line is red. The 12V power rail is yellow. The green line is the power signal cable. The power signal cable, when grounded, turns all other leads on from the power supply. The green power signal cable will be used as a master power switch for the entire table.

97

Page 106:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

Figure 65: Power Supply Wires

The power supply unit was mounted underneath the center of the board next to the water circulation reservoir. The dimensions of the power supply unit being used are standard ATX computer power supply unit dimensions. Those dimensions are 6 inches wide, 3.5 inches tall, 5.5 inches deep.

The system supplies power to all the main systems. The main systems are, laser system, LCD display system, light animation sequence system, cup detection networked under-table system, and the main central controller. In Figure 68, the power rail runs the entire perimeter of the table as a bus. There is a 3.3V power rail and a 5V power rail. This decreases the run lengths for power for widespread systems such as the lighting animation system and the light barrier system. The power rails are made of modular power buses that can be extended and modified using basic hardware components. The main bus connections will be encased in acrylic for water protection. These connectors were made from bus connectors.

98

Page 107:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

Figure 66: Power Rail Illustration

5.0 Prototype Testing5.1 Test EnvironmentEarly Testing - In the group’s early stages of testing, each subsystem that composes the DCPPTSS was tested individually. This includes testing the Central Control Unit, User Interface, Aesthetic LED Array, Capacitive Touch Sensors, Infrared Barrier, and Ball Washer in controlled environments and without any outside interactions.

Incremental Testing - As testing completes with various individual modules, the group began testing the interactions between modules. The Central Control Unit and the User Interface were tested together to make sure the proper interactions occurred. The Aesthetic LED Array was then added as well, and all three systems were tested at once. Once the Laser Discretizing Barrier and Capacitive Touch sensors had completed testing on an individual basis, the group tested these two modules together with actual ping pong balls. The automatic Ball

99

Page 108:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

Washer, being a subsystem separate to all other subsystems, was not tested with the other subsystems. The group’s goal in this method of testing was to incrementally build the DCPPTSS as each part was completed to be able to test the final product as it is meant to be used.

Complete DCPPTSS Testing - Once all individual subsystems were tested with one another, the group integrated all of them with the actual table to create the DCPPTSS. With the completed system, the group was able to test the DCPPTSS in three ways: a highly controlled environment in which each system was tested individually, an environment in which game-play was emphasized, and an actual party environment.

Highly Controlled Environment (and Scenario Testing) - The group first used a highly controlled environment to test all of the subsystems in the DCPPTSS. The group was able to test the interactions of the modules within the whole system. In this way the group used gathered information and improved each aspect of the DCPPTSS without compromising the experience of players of the game. The group was seeking the means to mechanically replicate the process of throwing a ball to remove the possibility of human error from their tests, and was also able to allow the group to reliably test rare and fringe cases that may occur during an actual game of Beer Pong. Once this is completed, the group moved on to a more practical method of testing: playing actual games of Beer Pong.

Playing the Game - In this phase of testing the group played many games of Beer Pong. This allowed the group to make sure the flow of the game was controlled properly by the Central Control Unit and the slave control units. The group deemed proper game flow and control to be one of the most important success factors of the DCPPTSS. This method of testing also allowed for a more random sampling of different scenarios that may occur during the course of a game. The group continued testing with actual live tests when this phase of testing was completed.

Live Testing and Party Atmosphere - This phase of testing was mostly performed by third parties. Teams of people outside of the group were able to test the DCPPTSS by playing games of Beer Pong. This allowed the group to test and monitor different styles of play, as well as the effectiveness of the DCPPTSS in creating an enjoyable experience. With testing by third party players complete, the group subjected the DCPPTSS to a live party environment. In this way, the group was able to test the physical qualities of the systems, and how it reacts to a variety of outside stimuli, such as bumping the table, spilling drinks, target cups moving when they should not, and so forth.

100

Page 109:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

5.2 Test Specifications

5.2.1 Central Controller

Due to the fact that the central control’s functions, other than keeping track of the game state, was communication the only testing that could be done were testing interfacing with other sub-systems. The sub-systems that were tested with the central control unit were the user interface, the aesthetic LEDs, the capacitive touch sensors, and the laser array ball detection system.

Testing the central control unit with the capacitive touch sensors began with interfacing the data and clock lines. This allowed for the data transfer from the capacitive touch sensors to the central control unit once a cup was removed which confirmed if a ball was made or not. Once the two modules were interfaced testing began with the removal simulating the game state on the central control to the point where the game is ready to be played and both teams have all 6 cups placed on the table. Once the part of the game state has been reached a cup would be removed from a capacitive touch sensor which would cause a LED on the central control unit to toggle on and off depending on the number of cups remaining.

When it came to testing the central control unit with the laser array ball detection system the data and clock lines must first be interfaced. Once that is complete the way to test the communication that the laser grid array actually sent data to the central control unit was to debug the central control unit using Code Composure Studio and while the game state is set to wait for a break in the laser grid array simply throw a ball and watch the variable ballDetection to see if the value changed from a zero to a one, if the value changes then we could see from keeping track of the variable that indeed that the systems correctly communicated with each other.

To test the output of the central control unit to the aesthetic LED array of course the serial clock and data lines must first be interfaced. Once the interfacing has been completed then the testing of the different statuses of the game can then be tested. The different game statuses will be simulated, team turn, opposite turn, team A win, team B win, rerack, as well as idle. Testing of the integration of the central control unit along with the aesthetic LED array is simply done by watching to see if the LEDs react to the current game state.

The testing of the central control unit along with the user interface occurs after interfacing the serial clock and data lines. Once these lines are interfaced then the testing can begin. There is no special prerequisite required for the testing of the user interface. All that is required is that the user interface is interacted with to cause a change in the game state. The output of the change in the game state should also cause a change in the aesthetic LED array. So whether the interaction is to signal a rerack, change team, etc, the LEDs will change accordingly which signifies that the communication works as expected.

101

Page 110:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

5.2.2 User Interface

The user interface for the Digital Competitive Precision Projectile Table Support Structure was an important part of the table, though it is not one of the immediately though-of features by Beer Pong players. For the purposes of testing, the cups and balls, while “low-tech”, were considered part of the user interface, as they were the objects which the users (players) interact with the most. The balls and cups were also used in tests for the discretizing laser grid and the capacitive touch sensors, respectively.  The other parts that were tested as part of the user interface are of the more typical of a user interface: the digital display for each team and the buttons that navigate the menus displayed to each team.

Balls and Cups - For the cups, the group tested to make sure the different sizes and shapes of cups worked in a game of Beer Pong as well as for the capacitive touch sensors. The only important type of cup to be tested is a 16oz. Solo cup filled with at least 2oz. of liquid; however the group tested other types of cups because they may or may not be used depending on the host of the party at which a game of Beer Pong is being played. Generic 16oz. Solo cups tested positively in every game played using the DCPPTSS.

Balls were similarly simple to test for the group. The only actual requirement was that the balls used will enter a cup when thrown by a player. The ball must also have been easy to throw for the players. 40mm balls tested positively for every game played on the DCPPTSS.

Menus and Navigation Buttons - The electronic parts of the user interface were most difficult to test. In order to be considered successfully implemented, all items of the menu must have been able to be accessed and activated. All of the functions initiated by the menu and navigation buttons were tested individually to make sure the DCPPTSS responded properly. All menu and navigation testing completed positively.

Current Game Status Display - First part of the user interface to be tested was the current game status display on the 16x2 LCD. The display on the table must display the respective team number, the number of reracks left for that team, and the number of cups left on their side of the table. As reracks are used and cups are removed from the table, the respective numbers must be updated accordingly. In addition, when a new game begins, the team number should have been set properly to the currently playing teams, and the number of reracks and cups should be updated to their default values. Approximately 30 games were played and each of the three numbers will be carefully monitored at each change in the game state (that is, any time a cup is moved, removed, or when a rerack occurs). This part of the user interface was nearly 90% accurate. Once each of those conditions was satisfied, testing moved on.

102

Page 111:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

Menu Access - The current game status display on the LCD is shown throughout the game when there is no interaction with the navigation buttons. Once the Menu/Select button is pressed, the menu of functions is displayed, and awaits further input. When the appropriate menu item is selected, the display will revert back to the current game status display. The menu access was tested by activating the game function menu from the current game status display, and then allowing the display to return to current game status display after selecting the appropriate menu item. This was tested 100 times consecutively and worked without error each time. A user interface module is considered to be the group of items consisting of one 16x2 LCD and the three navigation buttons that control the menus and activate the functions. There is one module mounted to the side of the table in the middle.

Menu Navigation - Menu Navigation is an important part of the user interface and an equally important part of testing. Navigating the menu must facilitate the users in giving the DCPPTSS commands that it cannot handle through its automatic systems (such as the capacitive touch sensor and the discretizing laser array systems). It therefore has two requirements: it must be easy to navigate and intuitive to use. This phase of testing was qualitative.

To perform this test, the group first tested among the group members to make sure that each button does what it is supposed to: move the on-screen selector to the left, start the currently selected function, and move the on-screen selector to the right. Then, when each function is initiated with the Select button, a confirmation screen appeared on the 16x2 LCD. The group members tested to make sure both the YES and NO options are navigable, and that they initiate the selected function or cancel the selected function and return to the menu screen, respectively. The group also tested to make sure that the selector/cursor wraps to the end or the beginning when the LEFT button is pressed on the first option (MISS) or the RIGHT button is pressed on the last option (RERACK). The order in which the functions are displayed and wrap is shown here: MISS<->SKIP TURN<->FORFEIT<->RERACK<->MISS. The double-ended arrows represent the direction of the button that must be pressed to reach that particular function. The group tested the menu navigation by making at least 100 button presses for the module without resetting the module at all. The group also tested to make sure that multiple simultaneous button presses do not cause the system to fail. This was done by making all seven combinations of button presses possible and repeating 10 times each. These tests passed 90% of the time and were considered successful.

The group then found 10 individuals of arbitrary technical ability to test the ease of navigating the menus. The individuals were required to use the user interface for a minimum of 3 minutes and select each of the functions at least once. The individuals were then required to rate the usability, the quickness of learning, and their relative familiarity with the navigating the menu after the short testing period. The ratings were marked on a scale of 1-10, corresponding to the following:

103

Page 112:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

Figure 68: The explanation of the ratings that the testers used to describe their experience with the menu navigation system

In order to succeed in testing, the ratings on each scale must be at least a 5 or higher for each category. If the navigation menu is below 5 in any category, the individual who tested explained why they chose that rating and was asked what would need to change to improve the rating given. In order to maintain impartiality, each of the testers performed their tests separately. 5 testers chosen at random were given brief directions on how to navigate the menu, while the other 5 testers were not given any information on how to navigate the menu. The users that tested after being given a quick tutorial scored the user interface at an average of 7.5, while those that were not given instructions scored the user interface at an average of 5.

Integration Testing - After the individual components of the user interface modules were tested as demonstrated above, full-scale integration testing was done. This integration test occurred in three distinct phases that had to be performed in order. The first phase was module functionality testing.

For module functionality testing, the group first tested the current game display again as above (the only difference being the integration with the rest of the table). Then, the group tested activating each function (MISS, SKIP TURN, FORFEIT, and RERACK) and tested confirming the activation (by selecting YES on the confirmation screen), as well as tested cancelling each function activation (by selecting NO on the confirmation screen). Each of these tests was performed 10 times for each function. For integration testing, these tests were considered successful if and when they passed 100% of the time. A given function test was considered passed when the given function executed and cancelled properly as denoted by the actions the DCPPTSS takes and do not take when the functions are executed and cancelled, respectively. The group also monitored the 16x2 LCD to make sure that when a RERACK is performed, the number of remaining RERACKs was properly decremented for each team, and that when the counter reaches 0, it no longer allowed RERACKs to take place. In addition, the cups remaining count was tested by making sure that the total cups remaining was updated properly when a cup was added or removed from a capacitive touch sensor. Cups-remaining-testing was performed for each side of the table 10 times each. Further testing occurred in the third phase of integration testing.

104

Page 113:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

The second phase of testing will test the integration of the current team display with the rest of the DCPPTSS. In order to test the current team display in integration testing, the group used the FORFEIT function multiple times in a row to quickly increment the team numbers. When a team loses, that team is replaced by the new current team. The use of the FORFEIT function allowed the team to test this replacement quickly without having to play through an entire game of Beer Pong. After the replacement has taken place, the current game status was updated to reflect the team number change on the 16x2 LCD of the side that initiated the FORFEIT. The current playing team display must have been able to display all numbers from 1 to 99. Therefore, this process needed to be performed at least 100 times per side. This also allowed the group to make sure that the team numbers roll over from 99 to 1 properly. This phase of testing needed to be performed by using the FORFEIT function.

The third and final phase of user interface integration testing was live play-testing. In this phase, two teams of two played full-length games of Beer Pong. The state of each 16x2 LCD was monitored at certain points during the course of a game. These points are: initial display (after the table is first turned on), beginning of a game (when no players have thrown), after the first-throwing team is decided, after each time a ball is thrown, any time a player interacts with the user interface menu, any time a game ends, and any time a new game begins. The group was looking for consistency between throws and turns, as well as making sure that the user interface was able to follow the flow of the game as their primary concerns. They also made sure that the appropriate numbers for team designation, cups left, and reracks left on the 16x2 LCD were set appropriately on the display based on the current game state. The third phase of integration testing completed at least 30 games of Beer Pong. It passed each portion of this phase with at least a 70% success rate (due to the pass rate defined in other subsystems) in order for the DCPPTSS user interface to be declared successfully implemented and integrated.

5.2.3 Cup Sensors

Using a modular testing procedure truly showed its virtues when testing the cup sensor units. Because the units are very modular themselves, modular testing only made sense. Each individual element of each cup sensor unit was tested separately before being integrated into a complete cup sensor. Each cup sensor was then be tested separately from the others. Once each cup sensor had passed its testing phase, two groups of six units were connected to a MSP430 in order to test them in the layout in which they would be in the completed DCPPTSS.

First, all sixty LEDs to be used in the cup sensors were connected to their respective TLC5940 LED drivers. The drivers were each jumpered to a MSP430G2553 and programmed with to turn the LEDs on and off. It was visually confirmed that each LED functioned correctly.

105

Page 114:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

Next, each capacitive touch unit was connected to a MSP430 programmed with testing code. For each unit, the number of charge/discharge cycles was measured with nothing but air above the unit, and recorded in the table below. A plastic disposable cup filled with four ounces of Miller Light was then placed on top of them, and the charge/discharge cycles measured and recorded. These measurements were then be compared for uniformity, and the recorded values used to adjust the detection thresholds for each capacitive touch unit.

Sensor #Avg # of Cycles

(No Cup)

Avg # of Cycles

(With Cup)1.0 5200 52001.1 7150 100001.2 3040 60001.3 2500 55001.4 3000 60001.5 4700 77002.0 3000 60002.1 3400 64002.2 7620 105002.3 4700 77002.4 9000 120002.5 3100 6000

Table 5: Table of measured capacitance changes

The next level of testing involved connecting five LEDs, one TLC5940 and one capacitive touch sensor to a MSP430 and testing them as one unit. This was done until all modules were segregated into individual cup sensor units. The MSP430 was programmed to control the LEDs based on the values of the capacitive touch sensor. Each unit was tested for functionality with a disposable plastic cup filled with four ounces of beer.

Finally, the twelve cup sensors were separated into two groups of six sensors. Each group was connected to a MSP430 to form the cup sensor sub-system for one side of the table. First, the team color selection portion of the system was tested. When powered up, each cup sensor displayed the color from they were initially programmed with. Once this was determined to be functioning correctly, the cup containing four ounces of beer was placed on top of one of the cup sensors, in order to determine that all cup sensors change their color to the correct color. This was done six times, once for each cup sensor. Once this portion of the system as determined to be working properly, the response to changes in capacitance was tested again, in order to be sure pin declarations in the code match up with the correct sensor unit.

106

Page 115:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

5.2.4 Discretized Laser Barrier

The laser barrier of the DCPPTSS was tested in a much less modular fashion than the cup sensor arrays. First, each laser emitter was connected to a 3.3V power supply, in order to ensure they were functional. After verification of functionality, construction of the laser arrays commenced, and the rails were mounted to the table.

Once mounted to the table, the laser emitters and detectors were connected to the multiplexing circuitry, which was also connected to a MSP430G2553, on a TI Launchpad. This allowed us to manually drive the multiplexer select lines, which was required to test each emitter detector pair.

For each emitter detector pair, the voltage across the voltage divided output from the multiplexers was measured with a Digital Multi Meter. This measurement was then recorded in the following table. From these measurements, it was determined that the voltage of the negative input to the comparator needed to be the highest allowed by the MSP430, half of V CC, or approximately 1.65V.

Detector # High Current

(uA)

Low Current

(uA)

High Output Voltage (V)

Low Output Voltage (V)

X0 9.3 0.3 5.6 0.18X1 9.3 0.2 5.6 0.12X2 9.2 0.3 5.5 0.18X3 9.3 0.3 5.5 0.18X4 9.3 0.4 5.6 0.24X5 9.5 0.3 5.7 0.18X6 9.3 0.3 5.6 0.18X7 9.3 0.3 5.6 0.18X8 9.4 0.3 5.6 0.18X9 9.3 0.2 5.6 0.12

X10 9.3 0.3 5.6 0.18X11 9.3 0.4 5.6 0.24X12 9.3 0.3 5.6 0.18X13 9.3 0.3 5.6 0.18X14 9.3 0.3 5.6 0.18X15 9.3 0.3 5.6 0.18X16 9.3 0.3 5.6 0.18X17 9.3 0.3 5.6 0.18X18 9.4 0.3 5.6 0.18X19 9.3 0.3 5.6 0.18X20 9.3 0.3 5.6 0.18X21 9.3 0.3 5.6 0.18X22 9.3 0.2 5.6 0.12

107

Page 116:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

Y1.0 9.3 0.3 5.6 0.18Y1.1 9.3 0.3 5.6 0.18Y1.2 9.3 0.3 5.6 0.18Y1.3 9.4 0.4 5.6 0.24Y1.4 9.3 0.3 5.6 0.18Y1.5 9.3 0.3 5.6 0.18Y1.6 9.3 0.2 5.6 0.12Y1.7 9.3 0.3 5.6 0.18Y1.8 9.3 0.3 5.6 0.18Y1.9 9.4 0.2 5.6 0.12

Y1.10 9.3 0.3 5.6 0.18Y2.0 9.3 0.3 5.6 0.18Y2.1 9.3 0.3 5.6 0.18Y2.2 9.2 0.3 5.5 0.18Y2.3 9.3 0.4 5.6 0.24Y2.4 9.3 0.3 5.6 0.18Y2.5 9.3 0.3 5.6 0.18Y2.6 9.3 0.3 5.6 0.18Y2.7 9.3 0.3 5.6 0.18Y2.8 9.2 0.3 5.5 0.18Y2.9 9.3 0.2 5.6 0.12

Y2.10 9.3 0.3 5.6 0.18

Table 6: Table used to record detector output parameters

Once the threshold value for the barrier had been determined, the testing program was updated to scan through each emitter detector pair and run the detection algorithm. A ping pong ball was dropped/thrown through the barrier, and the accumulator’s count was output for each pair. This output was recorded, and used to determine the thresholds for ball and hand detection.

Run # Ball Count Hand Count1 15 15652 17 18943 13 19854 21 12355 14 15466 19 12137 15 15658 18 17469 17 156410 13 1654

Table 7: Table used to record ball detection thresholds

108

Page 117:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

6.0 Administrative Content6.1 Division of LaborIn order to construct the Digital Competitive Precision Projectile Table Support Structure (DCPPTSS) in a timely manner, the group decided to divide the project into multiple parts based on the subsystems included in the DCPPTSS. These divisions were based on the parts that the individual group members researched and designed for the writing of their paper. There was some overlap in the work done for constructing the DCPPTSS for basic work such as soldering.

Christian Braun (the Muscle) was in charge of the capacitive touch sensors and the discretizing laser array. He was responsible for managing the testing of the capacitive touch sensors and the discretizing laser array. Christian also scheduled the group’s meetings and made sure that the project was keeping to the schedule.

Rashon Hogan (the Wildcard) was in charge of the aesthetic LED array and the ball washer system. He was responsible for managing the testing of the aesthetic LED array and the ball washer system. Rashon is the Wildcard.

Jelani Jackson (the Brains) was responsible for the central control unit and communication between devices. He was responsible for managing the testing of the communication protocol and the central controller. Jelani also made sure that the project maintains its focus.

Donald Thomson (the Looks) was responsible for the user interface. He was responsible for managing the testing of the user interface modules. Donald also made sure that the project did not go over-budget.

All group members were heavily involved in table construction. This included all soldering and wiring. In addition, the all group members used their expertise in the subsystems to perform integration and complete live testing.

6.2 Milestones

6.2.1 Senior Design 1

For Senior Design 1, the group needed to decide on milestones to make sure their project documentation was completed in time. The milestones corresponded to required documentation due dates throughout the course and also helped the group decide the specific designs for their Digital Competitive Table Support Structure to allow for an easy transition to the build and due dates in Senior Design 2. The milestones are shown below.

109

Page 118:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

9/20/11 Decided on Project Idea 9/26/11 Group Identification and General Scope Outline Document Completed10/10/11 Decided on Subsystems to be Included10/25/11 Begin Work on  Project Documentation10/30/11 Begin Research for Subsystems11/11/11 Finalized Subsystems Included12/2/11 Project Documentation Completed12/5/11 Project Documentation Due

6.2.2 Senior Design 2

In order to keep to a timely schedule for building and testing the Digital Competitive Precision Projectile Table Support Structure (DCPPTSS), the group had agreed upon milestones. These milestones helped keep the group on task for working toward the end of Senior Design 2. The list of milestones is shown below.

12/20/11 Begin purchasing parts12/20/11 Begin purchasing building materials12/31/11 Begin building table1/31/12 Table built1/31/12 Begin building Discretizing Laser Array12/31/12 Begin building Cap Touch units1/10/12 Begin building UI modules1/15/12 Begin building Aesthetic LED array1/31/12 Begin building Ball Washer1/15/12 Begin programming Central Control Unit2/12/12 Discretizing Laser Array prototyped 1/15/12 Cap Touch unit(s) prototyped1/22/12 UI module(s) prototyped1/20/12 Aesthetic LED array(s) prototyped2/7/12 Ball Washer(s) prototyped2/18/12 Begin modular testing on Subsystems3/15/12 Discretizing laser array completed3/25/12 Cap Touch units completed3/25/12 UI modules completed4/3/12 Aesthetic LED array completed2/18/12 Ball Washers completed4/3/12 Central Control Unit programming completed3/28/12 Begin integration of Subsystems4/4/12 Complete integration of Subsystems4/4/12 Begin testing of related Subsystems4/6/12 Complete related Subsystems testing3/15/12 Begin final presentation preparation4/6/12 Begin full integration testing of Subsystems4/9/12 Complete full integration testing of Subsystems

110

Page 119:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

4/10/12 Begin live-party testing of completed table4/10/12 Complete live-party testing of completed table4/10/12 Finish final presentation preparation4/11/12 Final Presentation

6.3 Budget

In order to fund the Digital Competitive Precision Projectile Table Support Structure (DCPPTSS), the group had decided to contribute $200 per member. This gave the group a budget of $800 for the DCPPTSS. The group performed research on the parts they were going to use to construct an itemized list of parts needed. This list is shown in the table below.

NamePrice/ea

QTY

Price/QTY Total

4 digit 7-segment LCD (I2C) $17.00 1 $17.00$683.3

016x2 LCD I2C $24.00 2 $48.00 IR Detector $0.92 112 $102.70 IR Emitter $1.05 112 $117.60 OBSF-30 arcade buttons $3.00 6 $18.00 RGB LEDs $0.41 100 $41.00 2x4s for legs, etc $30.00 1 $30.00 Stellaris $0.00 1 $0.00 MSP430 $0.00 4 $0.00

Misc Parts$100.0

0 1 $100.00 Materials (solder, etc.) $50.00 1 $50.00 Power Supply $35.00 1 $35.00 canned water (6pk) $20.00 1 $20.00 74HC238 Decoders $0.80 10 $8.00 circulating pump w/UV sterilizer $50.00 1 $50.00 Acrylic Sheets 4'x2' $23.00 2 $46.00

Table 8: Budget

7.0 User Manual7.1 SetupTo play a game of beer pong using the Digital Competitive Precision Projectile Table Support Structure (DCPPTSS) you must first place the table on a level

111

Page 120:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

surface. This is of great importance for a few reasons. One being that the table will support multiple cups with some form of liquid contained in them and second if the table is not level the ball washing system may overflow.

Once the table is placed on a level surface the user can then plug in the power for the Digital Competitive Precision Projectile Table Support Structure (DCPPTSS) as well as the water sterilization system. Plugging in the DCPPTSS allows the user to use the functions of the table and plugging in the sterilization system sterilizes the water as it is transported from the reservoir to the ball washing systems.

Figure 68: Plugging in the DCPPTSS

When it is time to add sufficient amount of water to the water system simply fill up 5 cups that will be used for playing beer pong. Pour these cups of water into the ball wash system

Figure 69: Filling the Water Reservoir

7.2 Playing a GameWhen it comes time to playing the game the LEDs around the capacitive touch sensors will be lit showing 6 colors, 1 color per cap touch.

112

Page 121:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

To choose the first team to start the game of beer pong using the Digital Competitive Precision Projectile Table Support Structure a team must simply going to the user interface and selecting either the left button for team on the left or pressing the right button for the team on the right.

Figure 70: Team Selection Screen

When it comes to choosing your color using the Digital Competitive Precision Projectile Table Support Structure a team must simply place a “standard” beer pong cup with 4 oz. of the liquid of choice and place that cup on the capacitive touch sensor representing the color of your choice.

Once the color has been chosen for a give team the remaining 5 cups can then be added on top of the capacitive touch sensors for that particular side.

Figure 71: Adding Cups to the Play Area

When all of the cups, containing the beverage of choice, have finally been placed onto the table and the users have selected which team goes first the game is ready to be played. The object of the game is to make the ping pong ball into the opponent’s cups to have them removed from the table. The game is played with a team having two throws per turn. After the throws are up it then becomes the

113

Page 122:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

next team’s turn. The game continues until all of the cups on a team’s side is removed from the capacitive touch sensors.

Once all of the cups on a particular side have been removed from the Digital Competitive Precision Projectile Table Support Structure the winning .

Once a winner has been determined while playing the Digital Competitive Precision Projectile Table Support Structure the central control unit will send the notification to the user interface which will display to the screen if a new game is to be played simply click on the right button.

Figure 72: Team Wins Screen

7.3 User InterfaceAfter choosing the first team, the user is shown the Game Status screen for that team. Pressing the Red or Green button will display the Game Status for the team on the left side of the table or the right side of the table, respectively. Here is an example of the Game Status screen for one of the players.

Figure 73: Team Game Status Screen

114

Page 123:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

In order to select a function, the user must first select the Game Status for the team that wishes to use a function by pressing either the Red or Green button, corresponding to that team. Once at the Game Status screen, the user then must press the Yellow button to activate the menu. Once on the menu, the user can select the appropriate function by using the Red button to move the cursor left and the Green button to move the cursor right. When the correct function is selected, the Yellow button must be pressed to activate it. Then, a confirmation prompt will display on the screen. The user must press the Green button to confirm the function, and the Red button to cancel the function. Regardless of confirmation, the display is returned to the Game Status display for that team.

During play, the Game Status updates to reflect the number of cups and reracks on a given side of the table. If there are zero Reracks Left for a team, the user is unable to select the Rerack function for that team.

If the count of cups somehow gets stuck for a specific team, remove all of that team's cups from the table, select the Game Status for that team, and select the forfeit function for that team. The user interface will then reset the cup count to zero, and the cups can be returned to the correct positions. If that does not work, or if the user interface freezes, remove all cups from the table surface, and toggle the power switch to reset the whole system.

7.4 BreakdownWhen it comes to breaking down the Digital Precision Projectile Table Support Structure all the user would have to do is simply turn off the switch beneath the table and unplug the power for the table as well as the water supply.

115

Page 124:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

Appendix AWorld Series of Beer Pong™ Full Rules and Regulations

General

These rules are designed with three purposes in mind:

Fairness to all players

Efficiency in running a maximum number of games simultaneously

Minimization of possible disputes between participants

These rules are meant to be applied to all BPONG Sanctioned events. However, some elements of these rules are specific to The World Series of Beer Pong, including Tournament Structure, etc. When an event uses a format that is different than that of the WSOBP, discretion on the part of the organizers should be used to apply these rules.

Tournament Structure (WSOBP Specific)

Prelims

Prelims will take place on the first two days of the event (January 2 and January 3)

Each team will play 6 games per day (for a total of 12 games) during prelims. Opponents will be chosen randomly. For each game in prelims, one team will have choice of table side, and the other team will have choice of first possession.

Each team will receive a schedule of their preliminary opponents. The schedule will indicate which team has choice of possession and which team has choice of table side.

Scoring of Prelims

After each game in prelims, a scorecard must be filled in and signed by a member of each team. The scorecard should be filled out with the following information: name of the winning team, name of the losing team, round number, table number, and the number of cups remaining on the losing team's side. In the event of a forfeit, an 'F' should be placed in the "remaining cups" section.

At the conclusion of prelims, all teams will be ranked, first by number of wins, and then by "Total Cup Differential".

"Total Cup Differential" is defined as the sum of the "Cup differentials" for all games

Page 125:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

actually played. For each game played, the winning team receives a "cup differential" equal to the number of cups remaining on the opponents side. The losing team receives a negative "Cup Differential" for each cup remaining on his side.

In the event of a forfeit, the forfeiting team receives a Loss and the opposing team receives a Win. Each team will receive a cup differential equal to the average cup differential of the rest of their games. In the event that the winning team has a negative cup differential, they will receive a cup differential of 0 for the game. In the event that the losing team has an average cup differential higher than -3, they will receive a cup differential of -3.

Any game that is won in overtime (or any successive overtime) will be counted as a cup differential of 1.

Finals

Finals will take place on the third day of the event (January 4). The highest ranked 160 teams will qualify. The lowest ranked 64 teams will face off against each other in a single game (aka the “play-in” round). The 32 teams that survive will be joined with the 96 teams who had a bye yielding 128 remaining teams.

The remaining 128 teams will be broken down into 16 groups of 8 teams.  Each group of 8 will enter into a “double-elimination” bracket.

The 16 teams that win their brackets will be split up into two groups of 8. Each group of 8 will enter in a “double-elimination” bracket.

The two teams that survive will face off in a “best-of-3” finals. There will also be a single game for third place.

If there is a tie for 160th or 96th place, ranking will be determined by a strength-of-schedule calculation. In the event that a tie still remains at the end of day 2, tiebreaker games will be held.

Equipment

Tables: 8' x 2' x 27.5" BPONG Tables

Balls: 40 mm 3-Star Tournament Grade BPONGTM Balls

Cups: BPONGTM 16 oz. cups

Top width: 3-5/8"

Page 126:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

Height: 4-5/8"

Base width: 2-1/4"

Racks: BPONG Racks

Game Setup

Cup Formation

10 cups per team

Starting formation is a "tight triangle" formation (rims touching), pointing towards the opposing side. BPONG Racks are used to maintain formations.

The 10-cup triangle must be centered on the table and the back of the rack must be in line with the back edge of the table.

Cups must not be tilted or leaned against the surrounding cups.

Content of Cups

For the World Series of Beer Pong main event, 24 ounces of beer or water will be used per team and will be distributed evenly in the 6 front cups. The back 4 cups will be filled 1/3 with water. These water cups are not for consumption--they are to be reused every round. All official World Series of Beer Pong Satellite Tournaments must abide by all local laws concerning beer pong.

Playing the Game

Shooting and Table Sides

In prelims, first possession will be determined by random selection. Each team will receive a printed schedule which will indicate which team has choice of first shot. Table side will be pre-determined, and will appear on each team’s schedule.

On day three, possession and table side will be chosen by the team with the superior rank in prelims. In the event of a tie (two teams with the same win-loss record and Cup Differential Per Game), a coin toss will determine who chooses to shoot.

The team with first possession will get one (1) shot. Each team will get two (2) shots for each turn thereafter, one shot per team member, subject to any other rules below.

Grabbing

Page 127:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

The ball in play may be grabbed, however ONLY after it has already made contact with a cup, but not while the ball is in the cup. You may not grab before the ball has hit a cup.

In the event of player interference prior to the ball making contact with a cup, (aka premature grabulation), a one-cup penalty will be imposed for the interference. The thrower who had his or her shot interfered with may choose the cup to be removed.

Bounce Shots: Players ARE allowed to let their shots bounce off of the table before making it to the cup.. In accordance with B(2) above, bounce-shots may not be interfered with until they have made contact with a cup. It should be noted that bounce-shots\do NOT count for two cups.

Balls may not be interfered with while inside of a cup. I.e., no fingering.

Reformation

Cups must be reformed at 6, 3, and 1 cups remaining according to the diagram below:

Racks must be aligned to the center of the table.В When one cup is remaining, the cup shall always be pulled back to within an inch of the end of the table, and it shall be placed in the center of the table.

Cups that drift out of position may be reformed, but only at the request of the thrower. In general, BPONG Racks should be used to ensure formation consistency.

Reformation is to take place as soon as applicable, even in the middle of a turn (i.e. mid-turn reracks).

Cups should be removed as soon as they are hit, even in the case where a reformation is not warranted. It is the responsibility of the shooting team to wait until a hit cup is removed to take their next shot. If a team shoots while the opposing team is reforming or in the process of removing a cup from the table, and the ball goes in the cup after making contact with the defending teams hand(s), the shot will count as a miss. If a shooter hits a cup that has already been hit, it will count as a miss.

If a team mistakenly shoots when a reform should have occurred, they have the right to ask for a reform after the fact. If a cup has been hit, and the shooting team then asks for a reform, the defending team gets to choose which cup gets removed from the reformed rack.

Rollbacks - The Pope's Rule

Page 128:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

In general, if both players on a team sink his/her shot on the same turn, that team will get one (1) additional rollback shot, not two.В The only exception to this rule is during redemption.

Either teammate may take the rollback shot.

"Miracles" - If a shot happens to land and stay on top of the cups, that shot will count as a miss. Congratulations - you are lucky, but you have not proved that you have any pong skills at all. If you can prove to us that you can intentionally land a ball on the cups on demand, we'll consider changing this rule. Until then, put the ball in the cup - that is the point of the game.

Leaning will be permitted, with the following considerations:

A player may not place a hand/foot/leg/penis/whatever on the table in order to gain additional reach and/or leverage. A player's hand may touch the table after a shot is released.

Players may not edge themselves around the table when they throw.

Under no circumstances may a player shoot with any part of his or her body on (against is permitted) the table. Of course, if you have a beer gut that must rest on the table because there's nothing else you can do with it; the "beer gut on the table" exception will apply.

Players may not move cups out of position in order to gain a leaning advantage. If the cups move as a result of contact with the body while shooting, the cups must be returned to their original spot before the opposing team shoots. Any cup knocked over as the result of excessive leaning will count as a hit shot. Beer Pong Events, LLC will not be liable for the resulting ridicule excessively leaning players are bound to receive from other participants..

Beer Pong Events, LLC will not be liable for the resulting ridicule excessively leaning players are bound to receive from other participants.

Distractions

Distractions are permitted with the following restrictions (subject to a one cup penalty)

Players may not cross the plane of play (the imaginary plane which runs vertically and separates you from your cups) with any part of their bodies, clothing, or other objects, while the other team is shooting. To avoid violating this rule, just stand back a few feet from your cups.

Page 129:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

Players may not fan, blow, or otherwise intentionally create an air current surrounding the cups in play.

Players may not approach the opposing team members in an unsportsmanlike manner. This includes running alongside the table to talk trash in an opposing players face. In general, players should never be on the side of the table (picking up a ball is an exception).

Players and spectators may not visually block cups from opposing players. This includes the use of lighting mechanisms to interfere with vision. As an example, no player may shine a laser pointer in his opponent’s eyes.

Spectators are permitted to aid in distractions, but may not be inside the playing area at any time. In addition, in the event that players are positioned close to the outer edges of a playing area, spectators are prohibited from unreasonably interfering with a players ability to shoot. Specifically, no spectator is allowed to scream directly into the ears of players at close range, or attempt to block a player’s view of the cups.

Distractions should not violate any local, state, or federal laws.

The Dipshit Not Paying Attention Rule

If TEAM1 knocks over one of its own cups, that dipshit's team (TEAM1) loses that cup(s). However, if the other team (TEAM2) also contains dipshits not paying attention that do not catch the first team of dipshits (TEAM1) knocking over their cup, then TEAM1 may keep that cup.

Balling your own cups

In the event that a player who has possession of the ball drops that ball into his own cups either accidentally or intentionally, no penalty is taken.

In the event that a player who does not have possession of the ball comes in contact with the ball and as a result that ball enters one of his own cups, such as by unintentionally acting as a backboard, that shot IS counted.

Interference

Ball Interference

Interference is defined as any contact, intentional or otherwise, between game pieces (balls or cups) and any other objects.

In the event of player interference prior to the ball making contact with a cup (aka

Page 130:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

Premature Grabulation), a one-cup penalty will be imposed for the interference. The thrower who had his or her shot interfered with may choose the cup to be removed.

In the event of interference on the part of non-players, such as spectators or officials, the shot is replayed.

In the event that a player drops his/her ball into one of his/her own cups, no penalty is enforced. (See "Balling your own cups")

All objects sitting on the table are considered part of the table for the purpose of determining interference. Specifically, if a shot bounces off of an errant object on the table (such as a water cup, a cup that has already been hit, a personal can of beer, etc) and then goes into a live cup, that shot is counted.

The previous clause notwithstanding, the playing area should be kept as clear as possible at all times. Specifically, no objects should placed in between the opposing cup formations.

Cup Interference

In the event that a player knocks over his or her own cups, those cups are to be counted as though sunk and removed from the table. They are not to be refilled or replaced unless the dipshits are not paying attention (See: Dipshit Not Paying Attention Rule). With the use of BPONG racks, if the entire rack is knocked off of the table, all of the cups are counted as hit, unless this occurred during reformation, in which case the cups are replaced..

In the event that cups are knocked over by any non-player, those cups are not counted as sunk, and are to be refilled and replaced in their appropriate positions on the table.

In the event that cups drift or are otherwise moved out of formation, those cups may be replaced in their appropriate positions upon request from the opposing team.

Drifters: In the event that a cup drifts out of its position while a ball attempting to sink those cups is in mid-flight, the shot is to be counted as a miss, unless it is absolutely clear that the movement of the cup was caused by the defending team, i.e. the defending team makes contact with the table. Once a ball has touched a cup, the defending team can cause the cups to move without penalty, but if they do knock cups over, the cups will be removed from the game.

Cup Adjustment: Cups may NOT be moved or adjusted while the ball is being released, or while the ball is in mid-flight. Doing so incurs a 1-cup penalty.

Page 131:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

Balls Knocking Over Cups: Cups should be filled to the point where it is not possible to knock the cup over with the ball. However, in the event that a ball does knock a cup over, the shot is counted as a hit, UNLESS it is absolutely clear that the ball never crossed the top plane of the cup before it was knocked over, in which case the cup is reset and the shot is considered a miss. To clarify, if a ball enters a cup, spins, and then exits the cup, and the cup falls off of the table as a result, the cup is counted as a hit shot, and is removed.

In the event that a ball enters a cup causing the cup to move, the defending team may not stabilize the cup. To clarify, if it appears that a cup is going to fall over, the defending team must allow this to happen.

Interference During Reformation

Players are not allowed to shoot until the opposing team has clearly finished reforming. In the event that the thrower shoots before this:

A cup made does not count and the opposing team receives possession of the ball.

A missed shot is counted as a miss and the opposing team receives possession of the ball.

Table Interference

Players may not make contact with the table while their opponents are shooting.

Ending the Game

Redemption (A.K.A. Rebuttal) & Overtime

As soon as the last cup is hit, the opposing team has the opportunity to try and bring the game into Overtime. See Appendix A for examples to illustrate the following rules. There are two different general scenarios for how to determine redemption rules: There are two or more cups remaining, or there is only one cup remaining on the side of the team that has hit last cup.

If there are two or more cups remaining, “Unlimited 1-ball Redemption” is given. Either player may take the first shot, and the ball is rolled back until a player misses. As soon as a miss occurs, the game is over. At this time, players MUST alternate throwers in the event of multiple hits-one player may NOT take all the redemption shots. The only exception to this rule occurs when there are three cups remaining when redemption begins. In this case, the first two shots must be alternated (i.e., the player who shoots first cannot shoot second), but the final shot may be taken by either player.

Page 132:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

If there is one cup remaining when the last cup is sunk, the rule is, “Take as many shots as you have balls remaining on your side”. For example:

Your opponent misses their first shot, but sinks the second into your last cup. You get 2 chances to redeem, i.e. you may miss once.

Opponent sinks your last cup on their first shot. You get 1 chance to redeem.

If an opponent sinks your last 2 or 3 cups in 1 turn, you get 2 chances to redeem, i.e. you may miss once

Successful redemption results in initiation of a 3-cup overtime, with the dominant team (the team which would have won had their opponents not redeemed), selecting possession.

Overtime (3-cup)

Overtime formation is a tight triangle.

The dominant team (the team which would have won had their opponents not redeemed) selects which side shoots first.

The same redemption and rollback rules apply during overtime as apply pre-overtime.

Miscellaneous

Disputes

A dispute is not considered to be valid unless witnessed by two or more individuals. In the event of a valid dispute, that game is considered paused and an official must be notified. Any witnesses to the event in question must remain at the table until the dispute has been resolved. All calls made by the referee are final. Intentional abuse of game rules and/or disputation without adequate cause is grounds for ejection from the tournament.

Time Limit On Shooting

In general, players are expected to take their shots within a reasonable amount of time, and in accordance with proper sportsmanship. Generally, no specific time limit is placed on shots.

However, times may arise when it is necessary to limit the amount of time each player has to take a shot. In these cases, a referee, at his sole discretion, may institute a ‘shot clock’.

Page 133:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

When a shot clock has been imposed, the referee will give each player 30 seconds to shoot. This 30 second period will start when the referee deems that the player is ready to shoot (i.e. the player has recovered the ball, and there is nothing preventing him from shooting). When a shot clock has been imposed, it must be imposed equally to all players for the remainder of the game. In addition, there should be a clock easily visible in the playing area where the players can easily keep track of the elapsed time (in general this clock should be digital). The referee will announce the start of the 30 second period, and then give a warning when there are 10 seconds remaining. In the event that the 30 second period expires, the shooter will forfeit his shot.

Absentee Players

In the event that a player is temporarily absent, no substitution may be made.В The game continues without the missing player; i.e. that team receives only one shot per side until the missing player returns.

In the event that a player is forced to vacate the venue by the owner of the venue, Beer Pong Events, LLC, hired security, or any other entity deemed to be authoritative on this matter at the sole discretion of Beer Pong Events, LLC, the team will forfeit the rest of the tournament, will not be permitted back in the venue, and will not be entitled to any refund, in whole or in part, of any fees paid for the event or any associated activities.

Conduct

All players are to conduct themselves in a matter respectful to other players, referees, and the sport of Beer Pong. Unacceptable conduct will result in severe punitive action, to be applied at the discretion of the referees. Unacceptable conduct includes, but is not limited to, fighting, abuse of referees, unreasonably throwing balls at opponents, abuse of other players, abuse of beer (excessive spilling), etc.

Interpretation of Rules

Final interpretation of these rules is made at the sole discretion of the referees.

Appendix A - Redemption Examples:

Here are some common examples of how the redemption rules are applied. Each team has two players, who we will call Player A and Player B:

There are 4 cups remaining on Team 1's side, and Team 1 has just hit last cup (It does not matter whether the first or second shooter hit last cup). Team 2 must hit all 4 cups

Page 134:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

on Team 1's side without missing. Player A from Team 2 shoots. If he misses, the game is over. If he hits, then the cups are reformed to a triangle, and Player B shoots. If Player B misses, the game is over. If Player B hits, then Player A shoots. If Player A misses, the game is over. If Player A hits, then Player B shoots. If he misses, the game is over. If he hits, the game goes to Overtime, and Team 1 gets the first two shots.

There are 3 cups remaining on Team 1's side, and Team 1 has just hit last cup. В Team 2 must hit all 3 cups on Team 1's side without missing. Player A from Team 2 shoots. If he misses, the game is over, if he hits, then the cups are reformed to a triangle, and Player B shoots. If he misses, the game is over. If he hits, then Player A shoots. If he misses, the game is over. If he hits, then Player B shoots. If he misses, the game is over. If he hits, the game goes to Overtime, and Team 1 gets the first two shots.

There are 2 cups remaining on Team 1's side, and one cup remaining on Team 2's side. Player A from Team 1 shoots and misses. Player B from Team 1 hits last cup. Since there were two cups remaining when last cup is hit, the rule is still “Unlimited 1-ball Redemption”. So, Player A from Team 2 will shoot. If he misses, the game is over. If Player A hits, then Player B shoots. If Player B hits, the game goes to Overtime, and Team 1 gets the first two shots.

There are 2 cups remaining on Team 1's side, and one cup remaining on Team 2's side. Player A from Team 1 shoots and hits on the first shot. Since there are multiple cups remaining on Team 1's side, this situation is played exactly like Example C.

There are 2 cups remaining on Team 1's side, and 2 cups remaining on Team 2's side. Player A from Team 1 shoots and hits a cup. Player B from Team 1 then shoots and hits last cup. Since there are multiple cups remaining on Team 1's side, this situation is played exactly like Example C.

There are 2 cups remaining on Team 1's side, and 3 cups remaining on Team 2's side. Player A from Team 1 shoots and hits a cup. Player B from Team 1 shoots and hits a cup. One ball is rolled back. Either player shoots and hits last cup. Since there are multiple cups remaining on Team 1's side, this situation is played exactly like Example C.

There is 1 cup remaining on Team 1's side, and 1 cup remaining on Team 1's side. Player A from Team 1 shoots and misses. Player B then hits last cup. В Since there is one cup on Team 1's side, and there are two balls on Team 2's side, Team 2 has two opportunities to hit the cup to bring the game to Overtime. If Player A on Team 2 hits, the game goes to Overtime. If Player A misses, then Player B takes a shot.

There is 1 cup remaining on Team 1's side, and 1 cup remaining on Team 2's side. Player A from Team 1 shoots and hits on Team 1's first shot. Since the last cup has been hit, the

Page 135:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

game goes directly to Rebuttal. Since there is only one ball on Team 2's side, Team 2 has only one chance to hit the remaining cup to bring Overtime. Either player on Team 2 may take the shot.

There is 1 cup remaining on Team 1's side, and 2 cups remaining on Team 2's side. Player A from Team 1 shoots and hits. Player B from Team 1 shoots and hits last cup. Since there is one cup on Team 1's side, and there are two balls on Team 2's side, Team 2 has two opportunities to hit the cup to bring the game to Overtime. This is played exactly like Example G.

There is 1 cup remaining on Team 1's side, and 3 cups remaining on Team 2's side. Player A from Team 1 shoots and hits a cup. Player B from Team 1 shoots and hits a cup. One ball is rolled back. Either player shoots and hits last cup. Since there is one cup on Team 1's side, and there are two balls remaining on Team 2's side, Team 2 has two opportunities to hit the cup to bring the game to Overtime. This is played exactly like Example G.

These rules are protected by U.S. copyright laws. Beer Pong Events, LLC, however, grants permission for these rules to be copied and/or modified, so long as credit is given to Beer Pong Events. For example, you may include, "These rules are based upon The WSOBP Rules, available at BPONG.COM." They may be copied and/or modified, so long as this statement is included on any and all copies.

Page 136:  · Web viewDot correction values for each color of each LED are stored within the TLC5940 EEPROM as a six bit word. This word adjusts the current of each output pin in 64 steps from

Appendix BTexas Instruments Permission

Use Restrictions

The Materials contained on this site are protected by copyright laws, international copyright treaties, and other intellectual property laws and treaties. Except as stated herein, these Materials may not be reproduced, modified, displayed or distributed in any form or by any means without TI's prior written consent.

TI grants permission to download, reproduce, display and distribute the Materials posted on this site solely for informational and non-commercial or personal use, provided that you do not modify such Materials and provided further that you retain all copyright and proprietary notices as they appear in such Materials. TI further grants to educational institutions (specifically K-12, universities and community colleges) permission to download, reproduce, display and distribute the Materials posted on this site solely for use in the classroom, provided that such institutions identify TI as the source of the Materials and include the following credit line: "Courtesy of Texas Instruments". Unauthorized use of any of these Materials is expressly prohibited by law, and may result in civil and criminal penalties. This permission terminates if you breach any of these terms and conditions. Upon termination you agree to destroy any Materials downloaded from this site.