GROUP 15 – DYNABOX
DynaBox
Escape Room Box Created to leave Users Puzzled
Group 15: Phil, Catalin, Ralu
Instruction Manual
The central switches are used to power on a specific puzzle, the top one is for the centre and left hand side, the other for the right hand side
Using the upper switch will power on the puzzle on the far left
To solve this puzzle the user must match the position of the shapes on the reference panel
Once this happens, the puzzle will be complete and the user will be able to play puzzle two
Puzzle two revolves around sequences. The four LEDs on the first stage indicate which button the user must press
After pushing the button – depending on input, the box will send a signal telling the user they are correct or incorrect
If the user solves all randomised sequences correctly, a tune is played and all LEDs flash in pairs
Puzzle three is a music puzzle. It is powered on using the lower switch
Listen to the tune it plays – each note corresponds to a button
The user must figure out what matches
The tune replays after approximately 3 mins
If the user inputs the correct code, a blue light is shown on the 3rd panel and a tune is played
Project Brief
Project 3 Escape Room Puzzle – Interactive Game Design
Escape Rooms require you to solve a series of puzzles within a time limit to escape. Create a puzzle for participants to solve using the skills you’ve learnt. Your puzzle might include a sequence of things to solve, should offer some help if participants get stuck, whilst also rewarding them on its completion. You are asked to design an Arduino based circuit that could be used as part of an escape room.
Cognitive problem solving skills are highly important in everyday life, from carrying out basic to highly complex multi-step tasks. Problem solving games have been extremely popular throughout time hinting to humanities love for creating intricate puzzles and games to test their own logical analysis.
The escape room puzzle requires multiple stages using tactical, visual and auditory elements as well as each separate stage/game when solved unlocks the next stage/game.
After every correct solution the user will receive a visual or auditory reward as well as a global indicator to show total completion.
The puzzle must have little to no instructions and strictly cryptic hints. This increases the puzzle’s difficulty and forces the user into critically thinking their way to solving our puzzle instead of solving it through direct instruction.
Target Market:
The Puzzle Box market is a part of the general puzzle market but differs such that puzzle boxes tend to be complex 3D objects that need to be solved (rather than being put together such as a classical puzzle) and tend to be of a higher difficulty to solve as they often require a mixture of problem solving, cracking, accretive and critical thinking skills to solve them. Puzzle boxes usually serve as a collectible after one is solved due to their unique aesthetic appearance.
Market definition: The Puzzles Market focuses on jigsaw and 3D puzzles, as well as slider puzzles, Rubik’s cubes and other brain teasers.
- Revenue in the Puzzles segment amounts to US$170.50m in 2022. The market is expected to grow annually by 5.09% (CAGR 2022-2027).
- In global comparison, most revenue is generated in China (US$1,243.00m in 2022).
- In relation to total population figures, per person revenues of US$2.49 are generated in 2022.
- In 2013, UK manufacturers sold approximately 1.77 million puzzles. The figures have increased significantly since, accumulating to an estimated 7.4 million puzzles sold in 2021.
- In 2021, the UK exported approximately 908.37 million U.S. dollars’ worth of scale models, wheeled toys, puzzles, and dolls to other countries around the world.
- In 2021, the UK imported nearly three billion U.S. dollars’ worth of scale models, wheeled toys, puzzles, and dolls from other countries.
- In 2020, imports with a quantity of approximately 254.59 million kilograms were made.
- In 2018, toys (such as puzzles) with a net weight of 61.51 million kilograms were exported from the UK.
Manufacturer sales of puzzles in the United Kingdom (UK) from 2008 to 2021 (in 1,000 GBP)
This statistic displays the annual sales value of puzzles made by manufacturers in the United Kingdom (UK) from 2008 to 2021. In 2021, UK manufacturers sold an estimated 33.3 million British pounds’ worth of puzzles.
As these statistics show, the puzzle market is healthy and growing fast in the UK. Our team feels that electronic based puzzles would be popular due to the fact that they would bring more opportunity in terms of difficulty levels, a large variety of different and creative puzzles to crack and, most importantly a electronic puzzle can me made so that the solution is different every time meaning that it can be used and solved again and again whilst requiring a different solution every time.
Project Goals
- Create a fun and mind racking interactive game that tests the users problem solving skills
- Create an object that leaves a user perplexed and takes time to decipher
- Make sure to leave as few hints for the user and make them cryptic to force the user into a critical thinking and mind cracking solving process
- The puzzle should be hard enough for the user to receive a euphoric and proud feeling when they solve the puzzle
- To make the puzzle look aesthetic and follow a certain theme for better game play
- To have auditory, visual and tactile features for more in depth game play
Components
- 9V Battery x2
- RGB LED x1
- Green LED x3
- Blue LED x1
- Arduino Uno x2
- Piezo x2
- Push Button x8
- Large Push Button x4
- Potentiometer x3
- DPDT Slide Switch x2
- Resistor 560Ohms x8
- Resistor 2200Ohms x 3
- Blu Tack
- Insulating Tape
- Zip tie
- Black Acrylic Sheet 60cm x 60cm
Tools
- Band Saw
- Hand Saw
- Coping Saw
- Power Drill
- Hot Adhesive
- Scissors
- 3D Printer
- Photoshop
Task List
PHIL
- Potentiometer code & circuit
- 3D designs & CAD
- Gantt Chart
- 3D Printing
- Engineering Drawings
- Project Brief
- Project Goals
- Target Market
- Market Research
- Design Choices
- WordPress Design
CATALIN
- Colour Led Game & Circuit
- Low Fidelity Prototype
- Breadboard Layout
- Flowchart
- Cut Acrylic For Larger Box Shell
- Box Assembly
- Soldering
- Combine Circuits
- Group Meetings Logs
- Shortcomings
- Sketches
- Youtube Videos
RALU
- Music Puzzle & Circuit
- Breadboard layout
- Combine Code
- WordPress Setup & layout
- Final Project Assembly
- Testing
- Debugging
- Puzzle Descriptions in WordPress
- Presentation
- Timeline
- Recycle and Reuse
- WordPress Layout
Timeline
Week 9 – Main Project Handout, Idea Generation, Find Materials and begin developing item
All – Discuss options and choose project, brainstormed ideas, decide on how the object would function, research the different or extra components which we may need to progress and create our project
Catalin – Produce sketches of product and lo-fi prototype, start to work on circuit, produce flowcharts on programmatically flow,
Week 10 – Create code and Circuits
Ralu – Create code for Piezo Puzzle Stage 3
Phil – Start to work with 3D Models of products
Week 11 – Assemble Puzzles and Object + Stress Testing
Ralu – Bug test code and I2C Connection
Catalin – Assembled 3D Printed Parts, Solder Components
All – Connect circuits
Week 12 – Blog Site
Meetings
19/11/2022
After looking at all of the projects we decided to go with the escape room puzzle box. This option seemed like the most intriguing idea. Our group was enamoured by ways of making a complete puzzle to leave the user perplexed. We aim to create something that a user can spend at least 10 minutes on that is of medium solving difficulty.
Brainstorming:
In order to come up with ideas we look at already existing products on the market to derive the good and leave out the bad from them. This led us to a multistage puzzle box. The idea of having one object was inspired by Chris Ramsey – a youtuber how specialises in puzzle solving videos. Doing market research led us coming to the idea of a multistage object.
21/11/2022
Deciding on a project led us to solving the first solution on our design journey. The functionality. We decided that it would be a good idea to have individual puzzles, almost like stages compiled together to create what is essentially an escape room as an object. The puzzle would consist of a:
- Light code stage
- Piezo Morse code stage
- Rotating Potentiometer stage
Aesthetic wise, we would like the object to have a minimalist look, something that doesn’t give away too much but still appeals to the user through mystery.
28/11/2022
The design for the product began. At this stage, many original ideas were altered for usability purposes. For example, the piezo puzzle requires hints otherwise it will be very difficult to solve and understand what they need to do in order to finish the puzzle. While the design for the casing was made the circuits were finalised.
Stage one – the potentiometer circuit was made using three potentiometers return values, when they are within a specific range, one statement will run signalling to the user that this was complete
Stage two – the light LED puzzle was originally created on a much bigger breadboard, however, due to the size of the previous design, we ended up scaling down to use one half breadboard. It contains a row of 4 different coloured LEDs which light up indicating what the user needs to press in order to solve the puzzle. After this is solved a signal is sent to the final part using I2C.
Stage three – this stage is put on ‘hold’ constantly awaiting the signal produced from stage two. When it receives this signal the variables and functions are run and this begins the puzzle. This functionality ensures that the three stages have to run in order of stage 1 – 3. If the user tries to access the third stage, it will not respond without stage 1, likewise with stage 2.
5/12/2022
All sides of the original design were 3D printed and ready to assemble
8/12/2022
At this point both circuits were working independently – this meant it was ready to be tested with the I2C connection. The connection would be created by using the RX and TX ports to send a variable between Stages 1 and 2 and Stage 3 to signal that both have been completed. At this stage it was identified that the circuits were prone to disconnecting and malfunctions due to hardware connections. This was solved by using blue tac, insulating tape and zip ties to keep cables together.
9/12/2022
In order to ensure the buttons securely fit into the breadboard we soldered the ends of the buttons to prevent fraying. After this, each component was inserted into the breadboard and then secured with blue tac.
After the 3D print was produced, it was clear that with the amount of wires present in the circuits would not be able to fit in the box. We solved this issue by expanding box size to a panel with a height of 8cm, length of 35cm and width of 23cm. This made sure to fit components, ensuring there would be enough space for both breadboards and high enough to not disconnect the wires potentially stopping the circuit from working.
We encountered many issues regarding circuitry which led to a lot of bug fixing after inserting the circuit into the black box. Most of these were solved by double checking wires and components for loose wiring.
12/12/2022
Finishing design touches added
Design Choices
We have decided to use carbon black PLA plastic as it creates an outstanding visual contrast between the plastic shell and the electronics. Due to this, the buttons and LED’s pop out in contrast and create a sci-fi look which we have pursued throughout the project.
The first stage of our puzzle is the potentiometer puzzle which we have chosen to implement as it has similar characteristics to popular safe cracking puzzles. The hints for which were designed to be simple to understand (i.e. the direction if the dials) however it requires trial and error or as commonly known a brute force technique to solve, just like a safe cracking puzzle would require.
The second stage was chosen to be visual based (unlike the fist stage was tactile), therefore we decided to use large and colourful buttons which corresponded to the same colour LED’s. The LED’s were placed onto the same panel as the first puzzle. As the buttons have their own panel, this is to better visually illustrate the linear continuation and to better link the games together.
The final stage was chosen to be auditory so that the puzzle box covers all the senses. This was also made to be the hardest game so that each game increases with difficulty as it common with similar puzzle boxes. The difficulty was made harder using more cryptic hints, as well as having a wider range of inputs for the solutions. This game was also made to significantly differ from similar games in puzzle boxes to add originality and for harder difficulty.
LED Stage:
For this stage, four led lights up. These indicate which button the user needs to press depending and in what order. After pressing the correct button a new sequence shows up and if this sequence is incorrect an animation is played alongside a tune which indicates to the user that they have entered the incorrect code. When this stage is complete a signal is sent to the piezo stage.
Piezo Stage:
For this stage, the piezo will make a series of beats with varying tones which are then translated by the user with key inputs through a button. If the user translates the code they heard correctly then they are given a green light and the user can go onto the next quiz. The light will flash in various different colours depending on how close the user is to the solution. After the puzzle is solved the final green led will turn on indicating that the user has completed the puzzle.
Potentiometer Stage:
This stage is using the potentiometer to map the correct values to preset boundaries. When the rotation value is between the specified boundaries on all 3 the puzzle is solved and one light is displayed. This indicates to the user that they have won this puzzle and can move onto the next part.
Flowcharts
Finalised Product
Breadboard Diagram
Recycle and Reuse
In order to accommodate for an eco friendly design we used recycled PLA plastic from other models for 3D printed components. The main body of the acrylic box was created from scrap in QMULs Makerspace bin and the button were left aside from an existing project. As none of our components are heavily combined with industrial adhesives it is very easy to take apart and recycles – or simply reuse other components.
Shortcomings
Due to time constraints, though the code for the I2C connection was complete alongside wiring, we were not able to bug test the two Arduino Uno circuits in one. This led to stages 1 + 2 and 3 running independent – instead of linearly. This meant though there are stages, the user is able to complete the hardest stage – stage 3 first.
Another shortcoming was the fact that we were not able to have a cube box with different sides for each game, due to the space and dimensions that the Arduino and bread board take up within the box. We therefore decided to have a design decision of making it a board panel of the 3 games.
We also were not able to have a servo in the box that opens up a token compartment, due to the constrictions of our scheduling and also the space limitation within the box.
Code
Stage 3
const int MAX = 8;
const int buttonPin = 2;
const int buttonPin2 = 3;
const int buttonPin3 = 4;
const int buttonPin4 = 5;
const int buttonPin5 = 6;
const int buttonPin6 = 7;
const int buttonPin7 = 8;
const int buttonPin8 = 12;
const int completeLED = A5;
bool btnState = false;
bool btnState2 = false;
bool btnState3 = false;
bool btnState4 = false;
bool btnState5 = false;
bool btnState6 = false;
bool btnState7 = false;
bool btnState8 = false;
//pins for RGB LED
int redPin = 9;
int greenPin = 10;
int bluePin = 11;
int buttonState = 0;
int choice;
int speakerPin = 13;
int tempo = 700;
String userTune = “”;
String replaceval = “a”;
String tune;
//for timer
int incrementor1 = 0;
int incrementor2 = 0;
//generate random array of letters
const int len = 3;
char song[] = { ‘a’, ‘b’, ‘c’, ‘d’, ‘e’, ‘ f’, ‘g’, ‘h’ };
//pick random value from array
const byte songLength = sizeof(song) / sizeof(song[0]);
char notes[len + 1]; //allow 1 extra for the NULL
//things for random no gen
int NumberArray[] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
int n = 0;
int testVal = 0;
//I2C connection
bool readyToStart = false;
char mystr[10]; //Initialized variable to store recieved data
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
//Code output
pinMode(speakerPin, OUTPUT);
pinMode(completeLED, OUTPUT);
//button inputs
pinMode(buttonPin, INPUT);
pinMode(buttonPin2, INPUT);
pinMode(buttonPin3, INPUT);
pinMode(buttonPin4, INPUT);
pinMode(buttonPin5, INPUT);
pinMode(buttonPin6, INPUT);
pinMode(buttonPin7, INPUT);
pinMode(buttonPin8, INPUT);
//RGB LED
pinMode(redPin, OUTPUT);
pinMode(greenPin, OUTPUT);
pinMode(bluePin, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
//I2C Connection
// Serial.readBytes(mystr,5); // Constantly read the serial data and store in var
// Serial.println(mystr); //Print data on Serial Monitor
// if (mystr == “Ready”){
// Serial.println(“Set”);
// readyToStart = true;
// delay(100);
// }
// if (readyToStart){
// //start program
// start();
// delay(1000);
// readyToStart = false;
// } else {
// //dodcf
// readyToStart = false;
// Serial.println(“false”);
// }
// delay(1000);
//test
if (testVal == 0){
start();
// winTune();
delay(1000);
testVal++;
}
buttonPress();
timer(NumberArray, n);
digitalWrite(completeLED, LOW);
if (btnState) {
RGB_color(255, 255, 125); // ultramarine
delay(100);
userTune += “a”;
btnState = false;
delay(100);
}
if (btnState2) {
RGB_color(255, 125, 0); // turquiose
delay(100);
userTune += “b”;
btnState2 = false;
delay(100);
}
if (btnState3) {
RGB_color(125, 255, 0); // bright turquiose
delay(100);
userTune += “c”;
btnState3 = false;
delay(100);
}
if (btnState4) {
RGB_color(125, 0, 255); //olive green
delay(100);
userTune += “d”;
btnState4 = false;
delay(100);
}
if (btnState5) {
RGB_color(255, 0, 255); // forest green
delay(100);
userTune += “e”;
btnState5 = false;
delay(100);
}
if (btnState6) {
RGB_color(125, 125, 255); // yellow green
delay(100);
userTune += “f”;
btnState6 = false;
delay(100);
}
if (btnState7) {
RGB_color(0, 125, 255); //greenish
delay(100);
userTune += “g”;
btnState7 = false;
delay(100);
}
if (btnState8) {
RGB_color(125, 0, 125); //bluish
delay(100);
userTune += “h”;
btnState8 = false;
delay(100);
}
//check if users answer is correct
if (userTune.length() >= 3) {
Serial.println(userTune);
if (userTune == notes) {
Serial.println(“You win”);
RGB_color(255, 0, 0); // Cyan
digitalWrite(completeLED, HIGH);
winTune();
delay(1000);
exit(1);
} else if (userTune != notes) {
RGB_color(255, 0, 0); // Red
userTune = “”;
digitalWrite(completeLED, HIGH);
delay(10);
digitalWrite(completeLED, HIGH);
delay(10);
Serial.println(“Incorrect”);
loseTune();
delay(1000);
}
}
}
void start(){
int n = sizeof(NumberArray) / sizeof(NumberArray[0]); //number of elements
Serial.println(“running”);
//shuffle array for random beats using bubble sort algorithm
beatGen(n, NumberArray);
//sound output
codeGeneration();
// replaceval = replaceval + notes;
notes[0] = ‘a’;
Serial.println(notes);
codeOutput(notes, NumberArray, n);
}
void RGB_color(int redValue, int greenValue, int blueValue) {
analogWrite(redPin, redValue);
analogWrite(greenPin, greenValue);
analogWrite(bluePin, blueValue);
}
bool buttonPress() {
//when button pressed, log it
if ((digitalRead(buttonPin) == LOW) && (!btnState)) {
Serial.println(“1 button has been clicked”);
btnState = true;
delay(200);
}
if ((digitalRead(buttonPin2) == LOW) && (!btnState2)) {
delay(200);
Serial.println(“20 button has been clicked”);
btnState2 = true;
delay(200);
}
if ((digitalRead(buttonPin3) == LOW) && (!btnState3)) {
delay(200);
Serial.println(“30 button has been clicked”);
btnState3 = true;
delay(200);
}
if ((digitalRead(buttonPin4) == LOW) && (!btnState4)) {
delay(200);
Serial.println(“4 button has been clicked”);
btnState4 = true;
delay(200);
}
if ((digitalRead(buttonPin5) == LOW) && (!btnState5)) {
delay(200);
Serial.println(“5 button has been clicked”);
btnState5 = true;
delay(200);
}
if ((digitalRead(buttonPin6) == LOW) && (!btnState6)) {
delay(200);
Serial.println(“6 button has been clicked”);
btnState6 = true;
delay(200);
}
if ((digitalRead(buttonPin7) == LOW) && (!btnState7)) {
delay(200);
Serial.println(“7 button has been clicked”);
btnState7 = true;
delay(200);
}
if ((digitalRead(buttonPin8) == LOW) && (!btnState8)) {
delay(200);
Serial.println(“8 Button has been pressed”);
btnState8 = true;
delay(200);
}
}
void playTone(int tone, int duration) {
//loop through each tone to play it for the specified duration
for (long i = 0; i < duration * 1000L; i += tone * 2) {
digitalWrite(speakerPin, HIGH);
delayMicroseconds(tone);
digitalWrite(speakerPin, LOW);
delayMicroseconds(tone);
}
}
void playNote(char note, int duration) {
char names[] = { ‘c’, ‘d’, ‘e’, ‘f’, ‘g’, ‘a’, ‘b’, ‘g’ };
int tones[] = { 1915, 1700, 1519, 1432, 1275, 1136, 1014, 956 };
// play the tone corresponding to the note name
for (int i = 0; i < sizeof(names); i++) {
if (names[i] == note) {
playTone(tones[i], duration);
}
}
}
//generate random code – this is what the uesr needs to enter to complete puzzle
String codeGeneration() {
for (int n = 0; n < len; n++) {
notes[n] = song[random(songLength)];
notes[n + 1] = ‘\0’;
Serial.println(notes); // ————————–
}
}
void beatGen(int lengthOfArray, int nArray[]) {
for (int i = 0; i < lengthOfArray; i++) {
int j = random(lengthOfArray – i);
int t = nArray[i];
nArray[i] = nArray[j];
nArray[j] = t;
}
// result
for (int i = 0; i < lengthOfArray; i++) Serial.println(nArray[i]); // ————————
randomSeed(nArray);
}
void codeOutput(char c[], int beatsTune[], int arrayLength) {
String val = c;
Serial.println(“Music Output”);
for (int i = 0; i < arrayLength; i++) {
//if the value entered does not match, then delay it
if (val[i] == ‘ ‘) {
delay(beatsTune[i] * tempo);
} else {
playNote(val[i], beatsTune[i] * tempo);
}
// pause between notes
delay(tempo / 2);
}
delay(100);
}
void replay(char c[], int arrayLength) {
String val = c;
for (int i = 0; i < arrayLength; i++) {
//if the value entered does not match, then delay it
if (val[i] == ‘ ‘) {
delay(NumberArray[i] * tempo);
} else {
playNote(val[i], NumberArray[i] * tempo);
}
// pause between notes
delay(tempo / 2);
}
delay(100);
}
//Amount of time to press a button before game times out
void timer(int beatsTune[], int arrayLength) {
incrementor1++;
//log when any button is pressed
if (
btnState || btnState2 || btnState3 || btnState4 || btnState5 || btnState6 || btnState7 || btnState8) {
incrementor2 = incrementor1;
Serial.println(“user pressed”);
}
if (incrementor1 > (incrementor2 + 5000)) {
//play tune for user again if they havent pressed anything for sometime
Serial.println(“Timed out”);
// Serial.println(arrayLength);
replay(notes, 10);
delay(1000);
//reset timer
incrementor1 = incrementor2;
delay(400);
} else {
}; //do nothing
Serial.println(incrementor1);
Serial.println(incrementor2);
}
void winTune(){
//array of characters to be played for tune
tempo = 100;
String val = “ccccdddeeffgg”;
int beats[] = { 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 4 };
//iterate through all characters in val and play each one for duration specified
for (int i = 0; i < sizeof(beats); i++) {
//if the value entered does not match, then delay it
if (val[i] == ‘ ‘) {
delay(beats[i] * tempo);
} else {
playNote(val[i], beats[i] * tempo);
}
// pause between notes
delay(tempo / 2);
}
delay(500);
}
void loseTune(){
//array of characters to be played for tune
String val = “ge”;
int missBeat[] = {1, 2};
//iterate through all characters in val and play each one for duration specified
for (int i = 0; i < sizeof(missBeat); i++) {
//if the value entered does not match, then delay it
if (val[i] == ‘ ‘) {
delay(missBeat[i] * tempo);
} else {
playNote(val[i], missBeat[i] * tempo);
}
// pause between notes
delay(tempo / 2);
}
delay(500);
}
You must be logged in to post a comment.