Mechatronics (Fall 2021)

The final project for ME218A (Smart Product Design Fundamentals) was to build an arcade-style game with a James Bond theme. The class focused on embedded programming in C, interfacing with electronic peripherals, and circuit design. We worked in teams of three on the final projects, building all of our circuits and hardware from scratch with the exception of an off-the-shelf audio board. The projects were completed over a span of three weeks. Our final report, which took the form of a website, is available here. My main responsibilities were the game software and the enclosure.

Our game was based on the gyrocopter dogfight scene from "You Only Live Twice." One screen acts as the radar, where the player can see three enemies slowly gaining on their aircraft. If the player does nothing, those enemies will continue to gain, eventually causing the player to lose. If the player turns the steering yoke according to the series of cues from the light-up green arrows on the console, the enemies begin to fall behind, eventually dropping off the radar screen. When the last enemy disappears from the screen, the player wins. The player can fire their missile and flamethrower once each, as in the movie, and will crash if they bank too far or run out of gas. Victory, defeat, and weapons all have associated sounds.

Our software was written in C using an event-driven programming framework provided by the class. I was responsible for coding the game mechanics, graphics, and test system. The graphics for our 8-by-32 LED dot matrix displays were written by hand, including moveable sprites and animations. The code to interface with the display via the serial peripheral interface (SPI) was also written during an earlier part of the class. I used a UART serial connection to a computer keyboard to test gameplay and output devices before we had the actual hardware inputs (buttons, potentiometer, etc.) connected. My code also controlled the graphics in the welcome, win, and lose states, and the pins driving the LEDs and audio board. The final report website (linked above) has some videos of gameplay and graphics.

The enclosure design was done in Fusion360. We needed a sturdy and aesthetic design that allowed easy access to the mechanisms and electronics inside. I chose to use inexpensive corner brackets with screws for all structural connections, avoiding weaker and irreversible glued joints. The top, front, and back panels are all easily removable for access to the screens, steering assembly, and circuit boards respectively. The "horizon display" is actuated by a servo motor within its housing. Fusion's top-down modeling paradigm made it easy to design and build the laser-cut components, including final adjustments for laser kerf and material thickness.

(Click to return to project list)