Friday, August 2, 2019

Building a Wooden Marble Run in a Picture Frame


This marble run was built 3 years ago, as a Christmas present for our family. After watching various YouTube videos, I wanted to make my own one. Due to time constraints, I decided to make it a small one, and focus mostly on the marble lift. I also chose to build it into a picture frame, so it can be hung on a wall. I picked a frame size of 16" x 20" (while I am teaching my students to use units from the S.I. system, i.e. metric units, I still get a kick from doing my projects in inches - I just love the fractions). The small size also set a natural limit for the scope of this project.

Concept / Sketch

The marble run is built into a frame of size 16"(h) x 20"(w) with a depth of 3". The marble lift is made of two stair-shaped pieces. A static piece (the blue one in the sketch) and a moving piece which slides up and down on two wooden dowels (red indicates its lower position and orange its upper position), operated by a servo. The stairs of both pieces are slightly tilted to the right. Furthermore the stairs of the static piece (which is sitting in the back) are tilted toward the front, and the stairs of the moving piece (which is sitting in the front) are tilted towards the back.

When the moving piece is lowered, the next marble enters (1). When the moving piece is raised (2), the marble rolls backwards onto the solid piece and then to the right (3). When moving piece is lowered again, the marble rolls onto it, and then to the right (4). Then, everything repeats. So, in every cycle in which the front piece is lowered and then raised, all marbles walk up one step.


I did not plan the whole project in advance. I just started with the frame and the above plans for the marble lift, and improvised each further step. That's why I do not have a perfect drawing with the final measures. While each square in the sketch corresponds to 1/4", please note that these are only approximate sizes.

Frame

I thought that a depth of 3" of the frame would give me enough space for one layer of tracks, and for the lift. With the table saw, I cut some 3" wide pieces which I cut down to a length of 16" and 20" with the miter saw. These were glued, and the frame was ready.




Marbles and Tracks

We had a number of glass marble lying around, so I did not have to buy these. They had slightly different diameters, around 17mm (or 11/16"), so I needed to be careful that the individual elements of the track worked for a range of different sizes and weights of the marbles. With a marble size of close to 3/4", I decided to make the track 7/8" wide with 1/8" wood on either side, adding to a total width of 1 1/8". With the table saw, I cut four 6-foot long pieces with a width of 1 1/8" for the tracks. I also used the table saw to "hollow out" the tracks, with a depth of 1/2" - this lets the marble stick out a little.



Then I played around to determine what would be a good slope. A marble run is most fun, if the marbles run as slow as possible - but, of course, they should never stop. From my attempts, I figured out that a slope of around 2.5 degrees would be best. So, I used the miter saw to cut the tracks at an angle of approx. 2.7 degrees into pieces with a length of 19" (which is a little longer then the final length).

 Laying the tracks on top of the frame gave a first impression of how the marble run would look like.

The Marble Lift

The lift consists of two pieces of "stairs" which are positioned diagonally in the frame. The back piece is glued to the frame, and the front piece is able to move up and down. Each step has a length of 1 1/2", which is a little more than twice the diameter of the marbles. The front piece is angled to the back, and the back piece is angled to the front side by 5 degrees. All steps are also angled to the right. 

The marbles enter the front piece in the lower left corner. When the front piece is lifted, the marble rolls onto the higher step on the back piece, and there it rolls to the right. When the front piece is lowered, the marble rolls back onto the front piece (to the next higher step) and from there it rolls to the right. This continues until the marble has reached the highest step on the back piece, from where it will enter the track. With eleven steps, the lift can carry eleven marbles at a time, providing continuous action of the marble track.


First, the back piece for the marble lift was then glued into the frame (the easy part). 

The assembly of the movable front piece required more focus on small details. Two slip fit holes were drilled vertically through the left and right edges of the front piece. These holes fit the dowels on which the front piece slides up and down. To hold the dowel on the left side, press fit holes were drilled through two smaller pieces of wood. One piece was glued into the left corner on the bottom, such that the spacing between the front and the back piece of the lift is approximately 1mm (a little less than 1/16") by putting a piece of cardboard between the front and the back pieces. While gluing this piece, the other piece was stuck on the top of the dowel, to ensure that the front piece is angled correctly.

After the mounts for the lift on the left were finished, the corresponding pieces for the right side were made. A hole was drilled through a larger piece of wood to hold the dowel. Then this piece was cut into two, and the top left corner of the lower piece was cut at an angle, so that it fit the shape of the front stairs. 

Both pieces were then glued into the top right corner of the frame. A piece of fishing line was used to lift the front stairs. The fishing line was knotted to a small screw at the bottom of the front stairs. From there is goes through an eye hook at the top of the frame. By pulling and releasing the fishing line, the front stairs can now be lifted up and down.

Assembling the Lift Mechanism

The front stairs are operated by a servo which is pulling the fishing line. The servo is held by a slot in a piece of wood. A 3-inch piece with rounded corners was used for the servo arm. An eye hook (not visible in the images) was screwed into the the arm from the back side.




For testing purposes, the servo holder was attached to the frame with a C-clamp, and the fishing cord from the front stairs was fed through the eye hook at the top and attached to the eye hook in the servo arm. The servo was connected to an Arduino (pro mini) which sweeps slowly through all angles from 10 to 170 degrees. With this set up I was able to test if the servo is strong enough to lift the front stairs up. And - yeah, it worked!

The servo holder was then glued into the top left corner of the frame. A thin plate was glued to the right side of the servo holder to cover the opening. Two rails were glued to the front of the front stairs, and behind the back stairs, to prevent the marbles from falling off the stairs.

A Cover for the Electronics 

The servo was connected to a Arduino Pro Mini microcontroller. The power is supplied by a 5V USB charger for phones/tablets. The power connector (for the micro USB plug from the charger) and the Arduino are mounted below the servo. For this purpose a cover was built to hide the electronics.


Adding the Tracks

At this point, the only missing pieces were the marble tracks. The tracks (which were cut before) were sanded, so they have a smooth inner surface for the marbles to roll, and slightly rounded corners.

For the lower right corner of the marble run, a block was drilled such that the marble enters from the top and leaves to the side. 


The tracks were then added, starting from the bottom. The bottom track requires an exit from where the marbles enter the lift.


From there, the tracks were added one-by-one.

An additional piece was required for the top right corner, to guide the marbles from the exit of the lift to the top track.


With this in place, the last track was prepared, ...

... and added, which finalized the woodwork. Here are two different views on the result.



Installing the Servo

Here are the Futaba S3003 servo (actually, a cheap Chinese clone, which is, however good enough for this project), the wooden arm, and the Arduino Pro Mini. 

The servo was mounted behind the wooden cover in the top left corner and connected to the Arduino. The servo arm was mounted to the front of the servo.



These are the views on the back side ...

... and the front side of the Marble Run.


And here is a detailed view on the marbles sitting on the lift.

The Futaba S3003 servo is operated by an Arduino Pro Mini (5V, ATmega168 version). This is very small and it can easily be “hidden” in the upper left corner, below the servo. For the power supply, a Samsung tablet charger is used which delivers up to 2A at 5.3V, and the voltage is connected to the “5V” pin of the Arduino. This is essential for the operation. Chargers with 5V or a lesser max. current did not work since the high servo current used to reset the Arduino.

The full beauty of the Wooden Marble Run is shown in the video at the top of this blog page, including all details, while operating at a fixed speed. In particular, I love the clicking sounds of the glass marbles on wood. 

Afterthought

After more than one year, I had to make an update. It turned out that the choice of the fishing cord for the marble lift was not the best idea. For a few weeks, the marble run was working rather well. Then the fishing cord started to stretch. Initially, I got away with adjusting the angular range for the servo. But at some point it could not be fixed in software. Then the beautiful marble run was hanging for eight months in it’s non-operational state...

When I had a little time to check this, I figured out it could be rather easily fixed. Obviously, it wasn’t a good idea to operate the stretching fishing cord by a servo at a fixed angle. A better approach was to provide the Arduino with the information when the marble lift has reached the top position. For this purpose, I added a micro switch.

It was mounted in the top right corner, and closes its contact whenever the lift reaches the top position. The two wires were hidden behind a piece of wood that runs along the upper edge of the marble run.


The Arduino code was modified, so that the servo is raising the lift only up to the point when the switch is closed. Now the marble run worked again!

Lesson learned: flexible fishing cord is not the best idea for a marble lift. It may be better, instead of pulling the stairs from the top, to push them from below (without any flexible cord). This will be reflected in the concepts for my next marble run...


No comments: