Introduction: Top-down Mechanical Maze in a Shoe Box, Using Arduino

I built a cardboard, top-down maze that has a small twist to overcome, in order to be able to get to the end of it.


  1. A shoebox, or any box that you deem fit.
  2. Lots of cardboard (to cut the maze out of)
  3. A standard Arduino kit, with
    1. A breadboard
    2. Plenty of wires
    3. Plenty of LED's
    4. Buttons (optional, for testing)
    5. Servo (for moving parts)
  4. Any device that you can use to write code (PC, laptop)
  5. A powerbank (optional, for making it portable)
  6. A pawn-shape, something with a narrow top and a wide base
  7. Aluminum foil
  8. Cutting tools (like retractable knives)
  9. Cutting mat
  10. Glue
  11. Tape
  12. Double-sided tape
  13. Electrical insulation tape
  14. Soldering kit
  15. A can of spray-paint

Step 1: Step 1: Design and Build Your Maze!

Planning is key!

Before you start building, take the time to make a fun lay-out for your maze! It's also good to think about where you want any points of interest to go, such as a button or trigger, or an obstacle that the player has to remove before continuing.

Your maze will have 3 layers:

  1. The bottom of the box
  2. The middle layer, which your pawn/playing piece will be resting on
  3. The top layer, which will have the cutout path that keeps the pawn inside the maze

Note: I built my maze out of cardboard, but your version could be made out of another material such as wood, or maybe even 3D-printed.

Bottom layer

Unless you have crazy ideas, the bottom of the box will go mostly unchanged. Between this layer and the middle layer, will probably be where you'll stow any cables from the Arduino that you don't want someone using your maze to see. (Unless you can make the cables fit in really well in the top layer. Then, do so by any means!)

Middle layer

The middle layer will completely cover the bottom layer. It will need some support to keep it up, in case you want to run wires underneath it for your circuits.

Top layer

This layer will be the meat of your maze. You will need to cut out a start, end, and the path(s) connecting both.

Be sure to leave a little bit of space between the middle and top layer! Your pawn will need room to move between the layers, while still being restricted so you can't just wiggle the pawn out of the maze. Hence, the pawn with a narrow top and wide base.

You can leave space between the layers by adding cardboard support pieces under the top layer, where they won't intersect with the maze's path.

A nice finish

Once you're done cutting everything, it's nice to give everything a nice look. I used spray-paint to make the otherwise dull shoe box a little less dull. I needed about 3 thin layers on every surface before the paint covered everything nicely.

Note: don't do what I did, and cut out pieces after you're done painting. You'll ruin the nice paint-job.

Step 2: Step 2: Arduino Time!

I decided on the following setup:

  • A trigger to start a timer, indicated by 5 LED's
  • A single gate that blocks the exit
  • A trigger somewhere else in the maze, that lights up another LED and opens the gate if it is activated before the timer reaches zero

To test, I started with a setup of 2 buttons, the set of 5 LED's, and another LED to indicate the second button being pressed.

Here is the code that I used, along with this setup:

With this code, you can for example...

  • shorten or extend the amount of time the player will have before the timer runs out after activation with the setTime variable
  • if you use a servo, determine how the servo turns, using servoClosed and servoOpened (note: pay attention to the if-statement in line 66. Make sure that you switch the > for a < if the servoOpened is a higher number than servoClosed)

I used a servo to create some kind of gate, which slides a piece of cardboard down into the ground so that the player can pass.

Step 3: Step 3: Add Everything Together!

It's time to put your Arduino setup to work!

Here is where you might need to do some soldering, if you find that your wires are too short, or if you want to use a wiring board (which I didn't, but can be very handy if you have little space to work with). Always be careful when soldering, and use proper protection.

I am a complete beginner at soldering, so I watched this tutorial before I started

I also practiced on a small piece of wiring board before soldering any parts that would go into the maze.

Power source

If you want an external power source other than your computer/laptop, a powerbank is a really easy option.

  • Be sure to test your powerbank, however! I had one that turned off after 30 seconds if no button on the Arduino was pushed, and you probably don't want that.
  • Make sure to use a powerbank that delivers a 5V/1A output. Anything else might ruin your Arduino!

Step 4: Step 4: That's It!

I hope that this helped you with building your own mechanically-infused maze!

My maze in action:

Step 5: Bonus: Don't Try to Cut Your Wiring Boards Like I Did.

Believe me. Saw them instead.