Skip to content

Hardware Development

Samuel Asebrook edited this page May 18, 2024 · 3 revisions

Hardware Overview

The hardware used in this scoring system was decided on in an effort to keep the entire system as straight-forward as possible. To start the game, and in turn the score tracking, the launch arm is pulled by the user. This situation is ideal since it is relatively easy to track when the arm is retracted, at least when compared to detecting if the ball has entered the play-field or not. To end the game, and in turn the score tracking, the ball leaves the play field through the hole between the two paddles. This situation, much like detecting when play begins, is ideal since it is relatively easy to track when the ball enters the pick-up area at the base of the board.

Digital/Analog Optical Sensors

To detect when the launch arm is pulled back, there were many options that I explored. I explored a button on the arm that the user could press during the act of retraction, however that proved to be rather impractical. I ended up utilizing an optical sensor that communicates with the Arduino Mega via analog for prototyping purposes, and then utilizing a limit switch for the final design.

Limit Switches

To not only detect when the game is over (the ball leaving the play field), but to also detect when obstacles in the play field are struck by the ball, limit switches were the obvious choice for hardware. The limit switches operate on 3.3V output from the Arduino Mega, and have the ability to respond to physical stimuli better than optical or push-button alternatives.

Detecting End Of Game via Limit Switches

When the ball leaves the play field, it falls down to a platform for the user to reinsert it into the launch apparatus. Because of this, implementing a limit switch on the platform that the ball falls onto is a simple way to detect the ball's presence. With the limit switch being at the very base, when the ball falls it will strike it every time, resulting in an easy to activate and manage method of terminating the game, and subsequently the scoring.

Detecting Obstacle Strike via Limit Switches

When the ball is launched up the play field by the paddles, there are four obstacles ("battleships") that have the ability to be struck. Striking constitutes the ball activating the limit switch that is facing relative down on the play field. Moreover on this, each obstacle has a "health" of four hits. After one hit, the player is awarded 100 points. After two hits, the player is awarded 200 points. After three hits, the player is awarded 300 points. After four hits, the player is awarded 1000 points and no more points can be obtained from striking. Every obstacle on the play field utilizes this logic; additionally, if the player manages to fully deplete the "health" of every obstacle on the play field, then the health of every ship resets and points awarded for striking are doubled. Exploration into the development of this logic and its implementation into the system can be found later in this Wiki.

Screens

In the grand scheme of the system, not much information needs to be visually displayed for the user. However, score does in fact need to be, which is why my implementation of my system includes screens. During the prototyping phase of the project, an LCD screen was utilized to display information, and then the final implementation of the system utilizes OLED panels.

LCD Display (Prototyping)

LCD I2C was utilized via 5V, SDA, and SCL supplied from the Arduino Mega to display score calculations, high score records, as well as fun messages for the user such as "Hell Yeah! Pinball!" when the system is booted up and "Good Luck! You Need It!" (Copyright (c) 1990 Beam Software) when the player is actively playing the game.

OLED Display (Final Implementation)

OLED panels were utilized in the final implementation instead of the prototyped LCD I2C component due to voltage restrictions. The brightness of the LCD I2C was strongly reliant on the amount of voltage it had access to, and since the screen shared a voltage with other components in the system the brightness, contrast, and clarity of the screen would fluctuate depending on how many facets of the system were active at a given time. To circumvent this issue, OLED panels were implemented, which resulted in independent color, brightness, and clarity control on the same 5V, SDA, SCL supplied by the Arduino Mega. All that needed changed was simple syntax and the address of the screen, details regarding such can be found later in this Wiki.