“Maze” is a game that constitutes two roofless boxes of two different sizes, the bigger of which has no base. They both hang on double stands fixed on a rectangular base on parallel sides where they are within each other as shown in the picture. One servo is attached to the larger box at one of the sides connected to the stands, while another servo is attached to the free wide side of the smaller box (maze box). Two screws hold the two boxes together at the other free wide side and the other fixed side.
The “Maze” is controlled by a joystick that moves one of the servos in the x-axis and the other in the y-axis respectively. This double movement navigates the ball inside the maze through the designed path, along which three touch sensors are placed. Two of those touch sensors would light up in red and let out an alarming sound indicating straying away from the right path, while the third at the end of the path lights up in green to indicate making it successfully to the end.
The Maze Box:
I started with sketching out the maze and proceeded with the four sides, the dimensions of which are 25*18 cm.
The base
I opened fusion and started sketching out the rectangular base based on the dimensions of the maze, and then proceeded on sketching its two sides and settled on the height of the maze.
Two sides of the base
I sketched a rectangle and then took an offset of a smaller size, and proceeded on lining out a 3-point arc on two sides connecting the bottom of the first rectangle to the top of the smaller one. Another 3-point arc was drawn connecting the adjacent edges of the top of the small rectangle.
The box between maze and base
I started sketching out the bigger box based on the dimensions of the maze and the rectangular base. Based on the measurements I took for one of the servos, I sketched out a rectangle of the same size with two holes into it for the screws. At the side that will be hung to one of the sides of the stand, one hole was sketched out for the screw.
T-slots were sketched into two sides while two 3.2 mm holes were sketched into the other sides.
Arduino Box:
I measured the Arduino’s box and the holes of the USB and adapter and started sketching it out based on these dimensions in order to gather the components (i.e. 8-bit LED, joystick, Arduino) and the wiring into it. I took the dimensions of the joystick and the 8-bit LED in order to attach them to the box.
I began assembling each of these sketches separately to make sure they fit well into each other before the cutting process, and then I inserted the rest of the sketches in the initial sketch of the rectangular base to gather the components all together to make sure the dimensions are accurate. Once confirmed, I downloaded the servo and inserted it into the project’s file.
Fabrication for base of maze part.
Fabrication for Arduino box.
When I finished sketching, I started to click on every part of the shape and make a new sketch to make sure that the sketch I will fabricate it have the last edits.
Saving these sketches and starting to save them as DXF, so I can cut them on the laser machine.
Importing the sketches into Laser CAD to import them to the machine and start cutting
All the designs will be in the black color because I need to cut it all, nothing will be engraved.
I start to cut with speed 4 and power 95.
Start Coloring the parts
Using the Maze Generator to make my maze
Download it as SVG, open it in Cureldrew at Fab Lab, then make an offset, turn it into a 90 degree, and make the dimensions 23.8*16.8 cm. I used these dimensions based on the size of the maze box, I made it 25*18, and every side takes 6mm to the side part, so the maze perfectly fits in.
Fabricating the maze part and hold it with screws from the sides with the base.
Start drawing the Circuit on fritzing , because I can not find all components on Tinker cad.
The components
-Joy stick
-buzzer
- 2 Servos
- 3 touch sensors
- 8 bit led
Connections:
1. The ground of the Arduino is connected to the ground of the breadboard
2. For the power supply part, I used 5 V adapter to give the required power to the circuit the Vcc is connected to the Vcc part of the breadboard and the ground is connected to the common ground of the breadboard
3. The joystick has 5 pins the pin 1 is connected to the common ground of the breadboard, Pin 2 to the common Vcc of the breadboard, Pin 3 ‘VRX’ to the pin A0 of the Arduino and Pin 4 ‘VRY’ to Pin A1 of the Arduino so they control the movement of the 2 servos
4. The two servos have 3 pins ( ground, Vcc , I/O ) in the 2 servos the ground is connected to ground of the breadboard , the Vcc is connected to the common Vcc of the breadboard but for the I/O pin in the first one is connected to the pin 9 in the Arduino and in the second one the I/O is connected to the pin 10 in the Arduino
5. Three touch sensors are used, they have 3 Pins ( ground, Vcc , I/O ) the first to ground, the second to the common Vcc , the third in the 3 sensors is connected to Pin 2, Pin 3 and Pin 4 of the Arduino according to their order
6. 8-bit led has 4 pins the first to the ground, the second to the Vcc and the third to the Pin 5 in the Arduino
7. Buzzer connected to the GUN of Arduino and pin 11.
The three touch sensors are used as the input they send their reading to the 8-bit led and the buzzer so they can give different actions, two sensors are placed in the path once the ball touch one of them the led gives red light and the buzzer gives a specific sound and the third sensor is placed at the end of the Maze once the ball touch the sensor the led gives green light and the buzzer gives another specific sound
The joystick is used as an Input sending its readings to the 2 servos, the 2 servos are output components they move according to specific angles depending on the mapping values for the joystick
5 V adapter for Servos and 9 V adapter for Arduino.
because the servos I use it need a 5 v power Source, and the other components will take the power from Arduino which will take the power from 9 V adapter
My project is a maze game, controlled by a joystick to move the two servos on the x-axis and y-axis, one of them fix the side part of the base to the center box, and the other one links the center box to the maze box.
On the other two sides, there are no servos, there are two screws to fix the design.
there is a small metal ball that moves when I change the angle of two servos by joystick, the ball has a bath that should go throw it to finish and win the maze, and throw this path there are three touch sensors, two of them were wrong when the ball touch it the led will light red and the buzzer will make a sound which means there is something wrong happen, and the last one is the right touch sensor 'the end of the path' when the ball touch it the led will light with green light and make a specific sound and it will last more than the red one.
-In the beginning, I used the Laser cut maze design generator to fabricate the maze, then I faced a problem with scaling the size of the maze the dimensions of the maze were not correct as I used the floor and wall way, but according to the advice of my mentor (Eng. Ahmed), I changed the way to a single sheet and I used another website ’Maze Generator’
-It was my first time using the joystick, so I was not able to understand how it works and its mechanism, until I received help from my mentor (Eng. Ahmed) and my college (Sharqawy).
-After I fabricated the Arduino box, I could not put it all together according to this I thought there was a problem with the dimensions, so I started to check the whole dimensions on Fusion, but I could not figure out the problem, later on, I figured out that the problem was in how I get it all together by the help of (Eng. Amaal )from Fab Lab team
In the circuit of the touch sensor and the 8-bit led, I was trying to write a code which makes the green/red light turns on upon touching the sensor and the led will not work if nothing touches the sensor but it did not work at the beginning, I tried to add and remove different lines in the code but it did not work then I have searched for different functions that might help in making the touch sensor works as mentioned before , later on I figured out the problem that I wrote if condition within a while loop so it never gets back to else so removing while from the code was the solution
Using the ‘’Maze generator ‘’ did not give the full control of the dimensions the way the other website does so at the beginning it was challenging and I tried to make it on a small scale first to identify thinking of the lines in the design as I could not understand it well from the design, after the fabrication I understand how it works so I started making a new design in the maze generator then I downloaded it and I made it with an offset to make the thickness of lines 6 mm.