Intro: Arduino Portable Escape the Room
Maker Community Braunschweig
This project was made possible with open source software/ hardware and the group efforts of Alexander Rönspieß, Rudolf Leue, Jonas Kieserling, Tim Kayser, Tim Kessel, Alexander Kemper and Felix Klempt. Fusion 360 was used for 3D-modelling, Arduino IDE for programming and compiling, and GitHub for collaborative programming. 3D-printing as well as some basic woodworking/ soldering skills were required to manufacture the hardware and wiring of the modules to the Arduino Mega 2560 microcontroller.
The inspiration of this project comes from the popular riddle game "Escape the Room", where players need to solve physical riddles in order to stop an imminent threat or escape a certain area. This project is in a portable format that can fit into a two small IKEA coffee tables stacked on top of one another. Here we decided to use plywood and MDF boards as our platform having similar dimensions.
In the middle of the table is a Fallout 4 nuclear bomb prop (Designer: Starscream83) with a red 7-segment display which will be counting down the time.
Around the nuke are four stations where players have to solve individual riddles in order to diffuse the bomb and save the city. Most of the instructions are stated in a handbook chained to the platform. Visual and audio cues will be built in to let the user know whether a station is unlocked or not.
The brains of the whole system is an Arduino Mega 2560.
A nuclear detonation has been activated and a countdown is initiated. It is the player's task to save the city from imminent destruction. On the platform are a series of buttons, rods, and ID cards. There is also a handbook with step by step instructions and information about the nuke which are required to successfully deactivate the launch sequence. First, there are three ID cards of authorized personnel that has to be inserted in the correct order. Failure to do so will result in a time penalty, where an x amount of time is subtracted from the countdown timer. Next, a series of questions need to be answered about the nuclear warhead. Any incorrect submission will also result in a time penalty. In the third station, the serial number of the nuke has to be inserted into the system. It is hidden somewhere on the platform. Every incorrect entry will result in a time penalty. In the last and final station, four control rods need to be lifted in the correct order to deactivate the launch sequence. Also, a mistake will result in a time penalty. Once all 4 stations have been solved, the electromagnet in the warhead of the prop de-energizes and it pops open, revealing a small prize.
Step 1: You Will Need
The combination of components depends on how you want to build your modules. Here are the components we used.
- 1 x Arduino Mega 2560
- Male and female header pin
Station 1: Personnel ID-Card Scanner
- 1 x Color Sensor
- 5 x Green LEDs
- 1 x Red LED
- 3 x 3" x 2" Plastic Cards
- 3 x Printed labels with fictional personnel information
Station 2: Technical Questions
- 4 x Click Buttons
- 4 x Green LEDs
Station 3: Serial-Number Entry
- 1 x Keypad
- 1 x 16 x 4 LCD
- 5 x Red LEDs
- 6 x Green LEDs
- 1 x Color Sensor
Station 4: Control Rods Sequencing
- 4 x 15 cm Metal rods
Source Code: https://github.com/rudeldi/p2.arduino (*Still undergoing changes, you can use it to sort of understand the structure of the code of such a game, questions are welcomed)
Step 2: Table Platform
The platform is made out of plywood with four uniform rectangular cut-outs. They measure in at 14.5 x 17.5 cm each. By keeping the cut outs uniform, we can design each station as a module and they can be swapped out easily. We would also be able to use different themes with the modular platform. After the cut-outs have been made, the platform was covered with blackboard foil.
As for the modules, it was constructed using both plywood and 3D-printing. The plywood serves as a holder for the individual components. Additional slots are made in the module holder for the 3D-printed components and are being held down with some hot glue.
Step 3: The Centrepiece
For the centrepiece we used a Fallout 4 nuclear bomb prop (Designer: Starscream83). The prop was first printed, sanded, painted and then assembled. Since the parts were printed in ABS, they could be easily glued together using some acetone, superglue works as well.
Next, some weathering is required to give the nuke an old weared out look. This is achieved with some water soluble paint. After several application and removal cycles, the prop looks weathered with some rust spots.
A hole is then cut for the 7-segment display to show the time remaining as well as a channel for the cables is drilled. A holder was constructed using Fusion 360 to hold the nuke on its side and to hide the wires that are being guided into the table.
Lastly, since the internal cavity of the prop is hollow, it is the perfect spot to hold the reward. For this we used a hinge and electromagnet at the end cap to keep it in place. We are also able to pop it open once all the riddles are solved.
Step 4: Personnel ID-Card Scanner
For the ID-card scanner, we used a color sensor to identify different color-coded personnel ID-cards. In this theme, the color stripes on the card represent different levels of authority (red, yellow and blue). In order to let the Arduino know when a card is present in the slot, a green LED is located directly opposite the sensor.
The color sensor has an array of photodiodes with red, green and blue filters. Four binary switches (pins S0 to S3) can be set with the function digitalWrite() to return RGB values of the individual colors. The sensor output values reflect the intensity, or lack thereof, of an object’s RGB values.
The values returned need to be assigned to color functions as the Arduino does not know what the individual colors look like. Here we used Boolean functions that return the value “true” if it sees a certain combination of RGB values and “false” when the if-statement is not fulfilled. Also, if it sees the color green, which is a color we are not using for the ID-cards, the Arduino will interpret this as having no card in the slot. This flag is required to compare RGB values with preset values only when a card is inserted in the slot, which blocks the green LED from the sensor.
A counter variable is set to +1 every time the right color is inserted in the right order and reset to 0 when it reports an error. It lets us jump into the respective if-statements comparing the color in the sequence.
Step 5: Technical Questions
In this station, four multiple choice questions are stated regarding the nuclear warhead in the handbook. There are four buttons where the user can input answers and four LEDs to indicate the progress. Each LED will light up when the questions are answered correctly in order. Any wrong input of the answers will cause the LEDs to blink and a time penalty will be issued.
Like the other stations, a counter is used to track the progress of the user. The counter is also used to control the progress bar with a switch() function. The main body of the function is governed by multiple if-statements and a flag function is used to make sure the input is only compared once with preset values until all buttons have been released. The if-statements also make sure that one single input is evaluated at any given time by making sure only one button returns true. Also, input values are only compared if the flag value is true and at least one button is pressed. The flag value will be set to false after the input has been compared once. It then waits for all buttons to be released and the flag value will be set to true and is ready for evaluation again.
The technical questions refer to the warhead and the user must visually examine the prop and platform to successfully answer the questions.
Step 6: Serial Number Entry
For the serial number station, the library keypad.h was used. The 12 button keypad has 7 input pins with 4 pins designated to rows and 3 pins designated for columns. A keypad object was created and the library takes care of the array assignment. Input values are stored in an array as a string and is compared with another pre-set array, which is also displayed on the LCD. An event listener waits for the user to press a button and jumps into an if-statement, comparing each array string with one another.
The serial number is hidden around the platform and the player has to find it within the allocated time. Any false entries will result in a time penalty.
Step 7: Control Rod Sequencing
The last and final station consists of four metal rods aligned in a row. At the bottom of the modules are metal washers that are in constant contact with the rods during its neutral position. The rods and washers are connected to digital input pins and ground. With the pins defined as INPUT_PULLUP pins, the rods act as a contact switch that returns the value 0 when in contact and 1 when lifted.
With these parameters we can now construct the function that is similar the the technical questions station. A counter is used to compare a sequenced value and the LEDs indicate progress. Once all rods have been sequenced correctly and there is still time in the timer a reward will be triggered.