Minesweeper
Date: August 2021 - December 2021
Minesweeper
Date: August 2021 - December 2021
The goal for this project was to recreate a board or video game that we knew from childhood as a physical game. We were to show what we have learned this semester in GEEN 3010: Circuits for Engineers by integrating electronics with mechanics to make this project.
Minesweeper, the classic game that came pre-installed on most old Windows computers. In Minesweeper, the goal of the game is to navigate the minefield and avoid the mines in it. When a player clicks on a square in the original game, numbers pop up on squares adjacent to at least one bomb. The number of bombs that that square is touching is indicated by the number in the square.
For this project we decided to build Minesweeper but with a twist. We decided to use touch pads as the boxes and have NeoPixel colors represent each number. This project involved coding, designing and fabricating a PCB, and understanding the circuitry for each component. As a group, we learned a lot as we were all put outside our comfort zone, especially in terms of coding and PCB design.
Stimulate at least two human senses
Indicate the passage of time
Have no more than two power supplies
Indicate progress toward a goal with a display
Be interactive
Be affected by user input
Fit on a table-top
Include a PCB that we designed specifically for this game
The game must also be safe for users and spectators
While making this game, we had to test it regularly to ensure that it was working as intended. One of the first tests we ran was checking the Neo Trellis. We noticed while running the Adafruit code that two of the lights would not turn on when pressed. While checking why this was happening (soldering issue, code issue, or board issue) we talked to Jonah. He checked the voltage going in the traces and found that the ones that did not work had no voltage going into them. We emailed Adafruit and had replacements overnight shipped to us.
The other testing was done with the code by troubleshooting it many, many times. For example, when coding the mines, we had them turn on to ensure there were ten mines and that they were randomly placed. However before we knew about the random seed, they were placed in the same spots each game. Once the mines worked, we tested the button presses, getting the code to compile, and after that pressing a button near a mine to see if the Neo Trellis would turn on or not. Overall, most of our testing was done with the code by trying to get it to work and understanding what it was reading.
To make the box, we had to consider the components that we needed to go inside as well as the 8 by 8 buttons. The size of the box and the finger joints were made using MakerCase, which ended up being 12” x 8” x 2”. We wanted the design to be similar to the online version. The designs for the Minesweeper aesthetics and color key were engraved into the box and filled in with sharpie to add color. From there we able to import the design (Figure 1) to the laser's cutter program and cut it out of white acrylic.
Figure 1: Design
Figure 2: Final Design
Figure 3: V.2
Figure 4: Final Design
We figured it would be best to make physical flags, as it might be difficult for us to code that into the buttons. There was three versions, where we tried to mold the plastic around the buttons, but they ended up too small (Figure 3), those were made from vacuum formed plastic. we then decided to make a CAD model and 3D Printed them as seen in Figure 4. The red and black was colored in with Sharpie.
In EAGLE, we connected the necessary ports on our LCD screen to the ports on an Arduino Uno and a trimpot. We also created spaces for the wires from our Neopixel PCB to be soldered into the shield. We were able to design the PCB in such a way that it could be printed single sided, which saved us time.
Top Side
Bottom Side
Final PCB
The two main components for our design were the LCD Screen and the NeoTrellis from Adafruit, which are the buttons and the lights. We were able to combine the schematics from both to get them to work on one board.
Although we were not able to get our game fully functional in the end, we still consider ourselves successful in the execution of our circuity. Being able to construct a circuit that allows all of our components to function successfully in unison indicates that we were able to utilize what we have been learning in class all semester in practical applications. And while constructing our game, we were able to learn other useful skills that can be applied to future projects, such as coding, laser cutting, and PCB manufacturing.
When selecting a game to make, we failed to consider how much coding it would require. All members of our team possess little to no knowledge of coding, thus making that part of the project difficult. Our project requiring extensive amounts of code forced us to learn and seek help from others who did know how to code. Reading each line of code and figuring out what its purpose was allowed us to truly learn code, even if they were basic functions. Laser cutting is also a resource that we as engineers have access to and could potentially find useful in the future. In making our game, we utilized the laser cutter for the function of both cutting and engraving, which allowed us practice with adjusting settings to fit our desired outcome. We have also learned the process of manufacturing a PCB. In the PCB lab during the semester, we weren’t able to see the actual manufacturing process for our designs in EAGLE, but by using a PCB in our circuit, we were able to watch the manufacturing process as well as be involved in it.
The final outcome of our game is one that we are proud of both in terms of appearance and functionality. The final design of our box was created exactly as we had envisioned it and our circuity functioned exactly as we intended it to.
Engineering Plus Major: Environmental Engineering
Integrated Design Engineering Major: Civil Engineering