View Full Version : [Contest Entry] Simple Marble Maze

09-04-2007, 10:00 PM

Marble Maze

We (Dad & daughter) are always looking for something new to do. Here, we decided to create a computer-controlled, labyrinth-like, marble maze.
Our goal was to program a computer to move a marble from the start to the end of the maze.

Our objectives for this project were to work an engineering project that was:
Something Dad & daughter can build and program together
Here is what we used.
A 4-Motor Servo Kit from Trossen Robotics (Only 2 Servo Motors are used)
Foam Board
Hot Glue
A marbleBuilding a Simple Marble Maze

The Maze Board
We built a maze board as in this picture. We simply drew a grid on a piece of foam board and glued straws onto it to make a maze.
On the back of the top-left of the board we taped some washers for weight. (Why? You’ll see below.)

The Tilting Control
We built a “containing fence” structure using foam board and hot melt glue. In it we constructed a “tilt-on” post (out of more foam board pieces) and hot melted two servos to the base at the top and at the left as pictured. The “tilt-on” post is directly centered. The control horns of the servos are centered on each side.
Now you can see that once the top-left-weighted maze board is placed into this base (such that it is loose fitting), each servo will lift the maze on its side when its horn is moved up. When a horn is moved down, the weight on the top left will cause the board to move back down on that side.

Creating a Program
Dad: My only goal with my daughter in the programming part of this project was to teach her about simple subroutines and parameters. I let her come up with names for the servo controller object and routines to tip the board and pause. Here were her choices for these things:
Thing -- Her Name -- Notes
Servo Controller -- GreenThing -- Hey – It is a green thing. Sorry, Phidget Company – Having this class called Phidgets.Servo is not named well. It is not a servo itself.
Tip Board routine -- Tip
Pause -- Freeze -- Need to pause execution while waiting for the marble to arrive at each waypoint.

Watch it Run!
Here a YouTube video of the computer moving the marble through the maze.

http://www.youtube.com/watch?v=PHku_-x4bzUThe Source Code
We coded the program using Visual Basic .NET. Note that we are not .NET experienced programmers. The source code is attached to this post.

Stumbling Blocks
In the video, you’ll see that the program causes the marble to pass by a couple of “correct path” intersections and then work back to them. What we found was that when we programmed the marble to make one of these intersections via precise timing, later runs were not always successful. We found that our primitive tilting mechanics are just not precise enough. It appears that the “floating” maze board (and the “unroundness” of most marbles?) makes the predictability of making these intersections not so great.

09-05-2007, 10:37 AM
Cool idea!

I understand that this is your first project and it was not your intent, so don't take my opinion to hard.

I saw that there was no sensors used, therefor it is not receiving any feedback.

For next steps you should add a camera (or something else similar), that will (with programming) allow it to get feedback and base it's movements accordingly.

So if the ball goes the wrong way, it will be able to correct its movements and get the ball to the end!

Remember, I'm only giving my opinion, I do not intend for it to discourage you from your work.

All the best,

09-05-2007, 10:41 AM
By the way, you can imbed YouTube videos like this:



And no Alex, I'm not trying to get my post count up...


09-05-2007, 12:04 PM
Mark - Thanks for the submission. This is a pretty creative project:) Excellent Job on the documentation!

For future reference though, please do embed the YouTube videos just as you did the pictures. There actually is a button in the Advanced editor that does all of this for you. All you have to do is provide the video ID.

Scotty - Using sensors with this project only makes sense if you want to make it autonomous or semi-autonomous, which I don't believe was the point of the project. It definitely is a cool idea for maybe a Marble Maze v2. BTW, we don't freak out like in other forums about that post count stuff Scotty, so no worries;) People have to post in order to build a community right?

09-05-2007, 03:08 PM
I am always fascinated by people who think of ways to build things for so cheap. In a million years I would have never thought to use straws and foam, which also allows for low cost servos as well. Brilliant.

This would explain why my bank account is always empty. I would have probably bought a CNC machine to make this same project... It reminds me of how the USA spent a million dollars trying to build a pen that would write in space. The Soviets saved a million dollars and used a pencil.

Nice solution Mark!

09-05-2007, 08:07 PM
srobot & Alex,

Ah... I had tried to embed the YouTube video originally, but couldn't make it work. I didn't realize I didn't need the http://..., just the YouTube ID. Thanks.

- Mark

09-19-2007, 02:31 PM
I'm loving the parent-kid projects being posted here. Very cool.