Overview Storyboard Room Layout Component Assembly Components Display Board Hit Detection Ball Return Floor Board Final Model Implementation Display Board Ball Collection Grid Electronics

Hardware and Software

The goal for the electronics part of the game was to install 36 sensors on the grid and a system of 36 LEDs that would respond to the detection of balls.

The initial idea was to utilize Ultra Sonic sensors, which measure distance. I considered using infrared sensors but given that they were going to be inside an enclosed grid, I was not sure they would get enough light to work reliably enough. IR sensors do not work well in the dark. I also thought Ultra Sonic sensors would work as well as optical sensors such as break-beam sensors. This in combination with the fact that I had worked with Ultra Sonic sensors before led me to choose them. For refrence.

I decided to test if using one sensor per row (for a more manageable total of 6 sensors) and incorporating distance thresholds into the code would be feasible. This resulted to be very unreliable for the size of our half scale model. The problem would be even worse for the actual sized game. Therefore, it was decided that installing 36 sensors would be best.

It was difficult to get Ultra Sonic sensors to detect falling objects reliably. It is still unclear why this was the case. Cycle time for the sensors was in the order of magnitude of microseconds so it should have been fast enough to detect a falling ball. Another theory is that the foam balls were actually absorbing some of the sounds waves emitted by the sensor and not reflecting them back, leading to no readings at times. Foam balls were used in an attempt to minimize bouncing. Moreover, after speaking to an electrical engineer in MIT's Product Design Lab, there was a worry that there would be too much echo and interference inside the box-like grid. Due to these reasons and because time was limited, I decided to utilize a push button system to control the LEDs with myself as the operator. This was in an effort to not sacrifice the game play for the presentation. For a future prototype, I would recommend using break-beam sensors.

The code tested for 1 ultrasonic sensor can be found here. Note: the code was written to be able to use one pin for both the echo and trig pins of the sensors. This was in an effort to bring down the number of pins needed to 36, avoid a wiring and soldering headache, and be able to control all sensors and LEDs from one Arduino Mega, which has 53 digital pins and 15 analog pins.

Individually addressable LEDs were used to light up the display board. The game started with part of the board lit. These LEDs would stay lit until the end of the game. This was to have the users think that the game had already started and they were there to finish it. Moreover, I thought this would be a clever way of minimizing the number of sensors or for this prototype, push buttons needed (the LEDs that are lit throughout the game do not need to respond to balls being thrown into their corresponding grid positions so they do not need sensors). This also simplifies the electronics and minimizes sources of errors or malfunctions, saving time and headaches. All LEDs flash white if the game is won. They flash red is the user runs out of time. The game was coded to be 3 minutes long.

See below for starting configuration:

Please see below for the configuration of the game in which all LEDs are lit. In a future prototype, it would be neat to have the tiles of the ships (on the right under the radar) light up accordingly with the display board as corresponding ships are hit. This was not implemented due to time limitations.

The LEDs were controlled using an Arduino. Please see below for the setup.

The code can be found here