Skip to main content

1.8

Major VersionM

by Pete Prodoehl

Introduction

Today, we will build a maze out of LEGO 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!

Video Overview

Featured Document

  1. Use LEGO bricks to build a border around the outside edge of a 32x32 LEGO baseplate. Arrange LEGO bricks in one corner to support a Crazy Circuits Robotics Board and a Piezo Speaker. We have another version of this project that uses a Bit Board & micro:bit instead of a Robotics Board. Check it out: LEGO Maze (micro:bit)
    • Use LEGO bricks to build a border around the outside edge of a 32x32 LEGO baseplate.

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

    • We have another version of this project that uses a Bit Board & micro:bit instead of a Robotics Board. Check it out: LEGO Maze (micro:bit)

  2. Cut two pieces of 1/8" Maker Tape about 5 LEGO studs long. Stick Maker Tape on to LEGO baseplate with the ends coming to Pin D9 and the Ground Pin right next to it. Stick Maker Tape on to LEGO baseplate with the ends coming to Pin D9 and the Ground Pin right next to it.
    • Cut two pieces of 1/8" Maker Tape about 5 LEGO studs long.

    • Stick Maker Tape on to LEGO baseplate with the ends coming to Pin D9 and the Ground Pin 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 Pin 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 Pin on the Robotics Board.

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

    • Press down the Piezo Speaker onto LEGO bricks over Maker Tape.

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

  5. Assemble the LEGO parts to build the gate arm. The parts are connected with swivels to allow them to easily rotate. Parts used:
  6. Slide the end of the gate arm onto the shaft of the Servo. Slide the end of the gate arm onto the shaft of the Servo.
    • Slide the end of the gate arm onto the shaft of the Servo.

  7. Mount the servo to some LEGO bricks attached to the baseplate. We used two LEGO Brick 2 x 2 with Pin and Axlehole (6232 / 42929) You could also use two LEGO Brick 2 x 2 Round (3941 / 6143) or any other method of mounting the servo on its side.
    • Mount the servo to some LEGO bricks attached to the baseplate.

    • We used two LEGO Brick 2 x 2 with Pin and Axlehole (6232 / 42929)

    • You could also use two LEGO Brick 2 x 2 Round (3941 / 6143) or any other method of mounting the servo on its side.

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

    • Add one LEGO brick over the top of the other bricks 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 bricks 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 bricks 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 following link: https://github.com/BrownDogGadgets/Crazy... In the Arduino software, open the file.
    • Plug the Robotics Board into the computer using a USB cable.

    • Download the Arduino Sketch from the following link: https://github.com/BrownDogGadgets/Crazy...

    • 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 the speaker will beep to indicate that it's working.

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

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

    • When the musical countdown 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 baseplate.
    • 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 baseplate.

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

  13. You are all set to run the maze! Tilt the LEGO baseplate 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 baseplate 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

4 Reputation

2 Guides authored

0 Comments

Add Comment

View Statistics:

Past 24 Hours: 0

Past 7 Days: 5

Past 30 Days: 18

All Time: 714