ECE497 Project - Paper Football
- 1 Executive Summary
- 2 Packaging
- 3 Installation Instructions
- 3.1 Getting the Necessary Hardware
- 3.2 Building the Wooden Board
- 3.3 Adding the Components to the Board
- 3.4 Wiring the Components to the BeagleBone
- 3.5 Installing Necessary Libraries
- 4 User Instructions
- 5 Highlights
- 6 Theory of Operation
- 7 Work Breakdown
- 8 Future Work
- 9 Conclusions
This project consists of creating a paper football game board and adding digital features and automation including scoring, possession, and a jumbotron. Two 7-segment displays are used for the scoring for the Home and Away teams. There is also an LED for each team that will light up in order to indicate who has possession. A switch is used to change possession from one team to another. A jumbotron displays various prompts such as whose turn it is as well as videos pertaining to scoring.
The overall game functions correctly. The switch correctly switches between the home and away teams and lights up the correct LED. The LCD correctly displays prompts for whose turn it is as well as when someone scores. The reset button correctly resets the game. The IR sensors work very well except for the top sensor which somehow got burnt out during the final week of the project.
The top IR sensor stopped working entirely towards the end of the project. We are not positive why, but it must have gotten burnt out on accident. We did not have time to order a new part to replace it.
The overall hardware design and structure of the game board turned out great. It looks very clean on top of the board. The bottom of the board is a slight mess of wires due to lack of time to devote to cleaning up every single one. The overall functionality of the board is very good, but it is not perfect. We had many problems with the IR sensors. The bottom 4 work pretty well; however, the top one ended broke. Issues with our breadboard (internal shorts, etc.) led to many of the issues with the IR sensors.
Parts used for this project:
- BeagleBone Green Wireless
- Adafruit 2.4" TFT LCD Display [Part No. ILI9341]
- Adafruit IR Break Beam Sensors (x5) [Part No. HD-DS25CM-3MM]
- Adafruit 0.56" 4-Digit 7-Segment Display w/I2C Backpack (x2)
- A switch
- A pushbutton
- 2 LEDs
- Plenty of wire and shrink wrap
- Approximately a 2' by 1' flat piece of wood (about 3/4" thick)
- 6' board that is about 3/4" by 3/4"
- Wood screws for assembly
- Yellow, green, white spray paint for aesthetics
Getting the Necessary Hardware
- BeagleBone Green Wireless
- Adafruit 2.4" TFT LCD Display
- Adafruit IR Break Beam Sensors
- Adafruit 7 Segment Displays with i2c Backpack
- Any generic switch, pushbutton, and LEDs will work
- You can find the wood at Lowe's, Menards, or any similar store
Building the Wooden Board
For every screw used to assemble the structure, we recommend pre-drilling a small hole to prevent splitting any of the wood.
Cutting the Pieces
First cut 4 equal size 3/4 by 3/4 pieces for the legs.
Next Build the field goal.
- The height of the large vertical posts are around 8"
- The total width (including side poles) is around 6"
- The distance between the crossbar and the "Grass" is around 4"
Cut the scoreboard and jumbotron posts
- 2x scoreboard 2" x 3/4" x 3/4"
- 1x jumbotron 4.5" x 3/4" x 3/4"
Paint the Pieces
- Green - Platform and Legs
- Yellow - Field Goal
- White - Scoreboard & jumbotron posts
Assemble the Pieces
First mark the locations of the pieces, and attach all but the field goal at this time.
- Center the posts for the field goal on the short side of the board, leave enough room for a through-hole on the backside for the sensor wires.
- Space the scoreboard posts equidistant from the back of the platform as the fieldgoal, and roughly 2" from the edge.
- Space the jumbotron in the center of the board (long-side) and leave enough room for a through-hole just like the fieldgoal and scoreboard posts.
Using adequate size bits for each application.
- drill a hole in front of each scoreboard post for the possession LEDs
- drill a hole opposite of the jumbotron post for the possession switch
- behind each post, drill a large enough hole for the corresponding wires to fit through
Fix posts to Board (Except Field Goal)
Adding the Components to the Board
Beaglebone and Breadboard
Affix the Beaglebone and breadboard on the bottom of the board. Make sure that both are in range to be able to successfully connect the wires correctly to either of them.
Field Goal and Sensors
Using super glue attach the transmitting ir leds equally on the back of one of the posts.
Next use a straight edge to align the receiving end of the sensors. If you wish to have more precision we used a printout of the a sensor pin while aligning them to detect if it was aligned correctly. Once we were confident in the position we superglued the sensor and repeated for each of the 5 pairs.
To test the sensor, we used the example program ir_sensors.py (in the examples folder of the GitHub repo) to give a preliminary test to see if it was aligned.
The last step for the field goal is to clean up the wires using shrink wrap, and finishing nails. A final product of our work is shown below.
Squeeze the wires through the hole on the board and screw in the field goal into its final location. Then connect the wires to the correct pins on the beaglebone.
Seven Segment Display
- Glue the 7 segment displays to be centered on the posts.
- Create a extension connection cable for the 7-segment pins
- Write Home/Away on the corresponding posts.
Once the cables are created and the displays is mounted, feed the cables through the holes behind the posts, and connect them accordingly.
Solder on extension wires to an LED, and feed them through the LED holes. Plug them into the corresponding pin.
Solder on extension wires to the switch, and attach it to the board. Plug the wires into the corresponding pin. label which direction will correspond with the HOME and AWAY team.
Solder on extension wires to the button. Affix it to the bottom of the board, close to the front. We chose to do this on the right side. We also labeled the location with the word RESET.
- Solder extension wires on to the LCD that are long enough to reach the breadboard from its final position.
- Glue the LCD onto the jumbotron post using superglue initially and hot glue on top of that.
- Feed the extension wires through the hole by the jumbotron post and connect the wires to the their corresponding pins
Wiring the Components to the BeagleBone
Installing Necessary Libraries
- Checkout the project repository: https://github.com/steffygm/ECE434_project
git clone https://github.com/steffygm/ECE434_project cd ECE434_project
- Run the install.sh script to install all of the necessary libraries
How to run the program
cd ECE434_project ./setup.sh sudo python paper_football.py
Theory of Operation
The overall software design for the project is rather simplistic. We created our project tin python in order to leverage the Adafruit libraries for each of our components. The main function configures the pins for the IR sensors, buttons, and leds. It also sets up 7 interrupts. 5 of the interrupts are for each IR sensor, and the other 2 are for the possession switch and the reset button. Each of the interrupts for the IR sensors calls the same ir_sensor interrupt handler which tracks the score for each team, updates the 7 segment displays, and updates the LCD. The possession switch calls a button_press interrupt handler that simply changes the current player between home and away. The reset button calls a reset interrupt handler that resets the scores, clears the 7 segments, and clears the LCD.
Group Work: The following tasks were worked on throughout the course of the project, and completed by the end.
- Build wooden gameboard
- Solder extension wires on all components
- Add shrink wrap on all visible wires to make them look nice
- Glue components onto the game board
- Mount a breadboard and the BeagleBone to the bottom of the game board
- Wire all components to the game board's breadboard
Russell's Individual Work:
- COMPLETE 11/3 - Create a python script to control the IR sensors
- COMPLETE 10/31 - Create a python script to control the 7 segment displays
- COMPLETE 11/6 - Create the initial python paper football script that includes all the IR sensors for goal detection, both 7 segment displays for scoring, 2 LEDs and a switch for possession, and a pushbutton for reset
Griffin's Individual Work:
- COMPLETE 11/8 - Create shell scripts for the LCD jumbotron
- COMPLETE 11/9 - Create a python script to call the shell scripts to control the LCD jumbotron
- COMPLETE 11/12 - Incorporate the LCD jumbotron code into the main paper football python program
- COMPLETE 11/9 - Troubleshoot IR sensors
- Try out different IR sensors or at least replace the broken one and continue troubleshooting the others
- Write the script in C to see if is more accurate
- Add a net behind the goal to catch the footballs
- Add a time trial game
- Add sound
Overall, this project was a lot of fun to work on. Aesthetically, we are very pleased with how it turned out. The basic functionality of the game works well; however, it is frustrating that we were having so many problems with the IR sensors and ran out of time to get them working fully again. We believe that we shorted one of the transmitter LEDs causing it to break, and were unable to fix it in the time we had remaining. The breadboard that we bought in order to mount on the bottom of the game board did not work correctly. One of the power rails was shorted and did not work; this caused many complications when it came to finding spots to plug the components in on the breadboard. As mentioned in the previous section, it would have been cool to be able to add a net to the board to catch the footballs, write the program in C and compare the speeds, and make a time-trial game where the user can see how many shots he could make in a minute. The final result of the project is awesome! We are very pleased with how it turned out, minus one of the sensors being broken.