Skip to main content

Lego Maze

Minor Versionm

by Benjamin J Nelson

Introduction

Today, we will build a maze out of Legos with a gate that needs to be unlocked before you can complete the labyrinth!

The ball we use to navigate the maze completes a circuit which will cause a servo to rotate and open the gate. The project is complete with a timer and musical count-down.

Can you beat the maze? Let's build it and find out!

Tools

No tools specified.

Parts

Video Overview

Featured Document

  1. Use Legos to build a border around the outside edge of a 32x32 dot Lego baseplate. Arrange Legos in one corner to support a Crazy Circuits Robotics Board and a Piezo Speaker. Arrange Legos in one corner to support a Crazy Circuits Robotics Board and a Piezo Speaker.
    • Use Legos to build a border around the outside edge of a 32x32 dot Lego baseplate.

    • Arrange Legos in one corner to support a Crazy Circuits Robotics Board and a Piezo Speaker.

  2. Cut two pieces of conductive Maker Tape about 5 Lego dots long. Stick Maker Tape on to Lego board with the ends coming to pin D9 and the ground right next to it. Stick Maker Tape on to Lego board with the ends coming to pin D9 and the ground right next to it.
    • Cut two pieces of conductive Maker Tape about 5 Lego dots long.

    • Stick Maker Tape on to Lego board with the ends coming to pin D9 and the ground right next to it.

  3. Cut Maker Tape for the Piezo Speaker. Apply the tape so that the ends go to pin D0 and the ground on the Robotics Board.
    • Cut Maker Tape for the Piezo Speaker.

    • Apply the tape so that the ends go to pin D0 and the ground on the Robotics Board.

  4. Snap down Robotics board onto Legos over Maker Tape. Snap down Piezo Speaker onto Legos over Maker Tape. Make sure boards are firmly attached to the Lego board and that Maker Tape makes a solid connection to the pins.
    • Snap down Robotics board onto Legos over Maker Tape.

    • Snap down Piezo Speaker onto Legos over Maker Tape.

    • Make sure boards are firmly attached to the Lego board and that Maker Tape makes a solid connection to the pins.

  5. Snap together the Lego parts to build the gate arm. The parts are connected with swivels to allow them to easily rotate. The parts are connected with swivels to allow them to easily rotate.
    • Snap together the Lego parts to build the gate arm.

    • The parts are connected with swivels to allow them to easily rotate.

  6. Slide the end of the gate arm on to the shaft of the Servo. Slide the end of the gate arm on to the shaft of the Servo.
    • Slide the end of the gate arm on to the shaft of the Servo.

  7. Mount the servo to the Lego board. Surround the end of the Lego Gate with Lego pieces. This creates a track in which the gate can slide. Add one Lego block over the top of the pieces making the track. This prevents the gate from being able to pop up out of the track.
    • Mount the servo to the Lego board.

    • Surround the end of the Lego Gate with Lego pieces. This creates a track in which the gate can slide.

    • Add one Lego block over the top of the pieces making the track. This prevents the gate from being able to pop up out of the track.

  8. Plug the servo wires into the Robotics Board. We will plug it in to Pin D3, and its associated 5V and GND. Make sure the ORANGE wire is in D3. That's towards the near edge of the board
    • Plug the servo wires into the Robotics Board.

    • We will plug it in to Pin D3, and its associated 5V and GND.

    • Make sure the ORANGE wire is in D3. That's towards the near edge of the board

  9. Fill the Lego board with blocks to create a maze. Make sure there is a clear path from the entrance, to the Maker Tape switch, to the gate. Make sure there is a clear path from the Gate to the Exit.
    • Fill the Lego board with blocks to create a maze.

    • Make sure there is a clear path from the entrance, to the Maker Tape switch, to the gate.

    • Make sure there is a clear path from the Gate to the Exit.

    • You should ONLY be able to complete the maze by passing through the gate, once it is open.

    • Use the space completely. FILL it with a complex maze. Don't be afraid to spend some time on this.

  10. Plug the Robotics Board into the computer using a USB cable. Download the Arduino Sketch from the link provided. In the Arduino software, open the file.
    • Plug the Robotics Board into the computer using a USB cable.

    • Download the Arduino Sketch from the link provided.

    • In the Arduino software, open the file.

    • Click the Upload Button.

    • The code will load onto the Robotics Board. Once it does, the servo will move and speaker will beep to indicate that it's working.

  11. Test the gate by moving the ball bearing onto the two pieces of conductive Maker Tape. When the ball bearing touches both pieces of tape, the servo will rotate to open the gate and a musical count-down will begin.
    • Test the gate by moving the ball bearing onto the two pieces of conductive Maker Tape.

    • When the ball bearing touches both pieces of tape, the servo will rotate to open the gate and a musical count-down will begin.

    • When the musical count-down ends, the gate will close.

  12. To make the Lego Maze portable, you can add a battery pack. Use double-sided tape to attach a 5V USB "power bank" style battery to the back of the Lego board.
    • To make the Lego Maze portable, you can add a battery pack.

    • Use double-sided tape to attach a 5V USB "power bank" style battery to the back of the Lego board.

    • Plug in a USB cable from the battery to the Robotics Board.

  13. You are all set to run the maze! Tilt the Lego board to roll the ball bearing through the maze. Get the ball bearing to the conductive tape to open the gate. Get the ball through the gate BEFORE the time runs out!
    • You are all set to run the maze!

    • Tilt the Lego board to roll the ball bearing through the maze.

    • Get the ball bearing to the conductive tape to open the gate. Get the ball through the gate BEFORE the time runs out!

    • Get through the rest of the maze to the exit.

    • Challenge yourself by changing the Arduino code so that there is less time to get to the gate.

    • Re-arrange the Lego Maze for a whole new experience!

    • Play against your friends. Make them run the maze you build. You can run the maze they make for you!

Conclusion

The Crazy Circuits Robotics Board lets you control servos for all sorts of fun!

A switch made by a ball bearing and two strips of conductive Maker Tape can be be used for all sorts of projects, not just this one.

Modify this project by changing the time you have before the gate closes or the tones that are played. Challenge your friends by re-arranging the maze!

One other person completed this guide.

Attached Documents

Benjamin J Nelson

Member since: 09/27/2019

1 Reputation

1 Guide authored

0 Comments

Add Comment

View Statistics:

Past 24 Hours: 1

Past 7 Days: 9

Past 30 Days: 38

All Time: 154