Quantcast
Channel: Hacker News
Viewing all articles
Browse latest Browse all 10943

Binary marble adding machine

$
0
0

Comments:"Binary marble adding machine"

URL:http://woodgears.ca/marbleadd/


Way back when I built my Marble Machine one, I incorporated a few logic-like elements in it, including several divide by two mechanisms, as well as a complicated and slightly unreliable divide by 6 mechanism.

It had occurred to me that perhaps with an insane amount of perseverance, it might be possible to build a whole computer that runs on marbles. But my second marble machine was much less based on logic - it was more about just making lots of cool noises.

But then I had an idea as to how the divide by two mechanisms from my first marble machine could be cascaded together to actually function as a sort of adder register, or counter. Once I had that idea, I knew I had to try it. And a few months later, I spent a couple of days in my workshop and built my binary marble adding machine.

The core of the invention is a modification of the divide by two flipflop to retain the marble that falls off the right side, and keep it until the flipflop is flipped to the left by the next marble. See the small diagram above right. The retention of this extra marble allows the state of the marble accumulator to be dumped. The adder would just as well add without it, but the number would have to be read off by the position of the rockers, rather than have the device dump the count out. Really, if such an adder were integrated into a hypothetical marble computer, reading out the result as a series of marbles would be an essential element.


The top flipflop on the image at left is rocked to the right, with a retained marble (stores a one), and the bottom flipflop is rocked to the left, storing a '0'.

If a another marble is dropped onto the top rocker, the marble will be deflected to the left because the top tip of the rocker is pointing to the right. This in turn rocks the rocker to the left, releasing the stored marble on its right side. In the mean time, the marble that rocked the top rocker to the left falls through the hole in the piece just above the next lower rocker, and flips the rocker to the right. The marble is subsequently retained, as it is prevented from falling out by that rocker.

The image at left was taken before I added a few extra pieces of wood to help guide the marbles. These were necessary, as every once in a while, a marble would bounce off at an odd angle, and become ejected from the machine, resulting in a computational error.


This photo shows the mechanism, with extra guides to keep the marbles from falling out. With the marbles falling from considerable height from the top of the machine, getting them to consistently not bounce out of the machine, without obstructing the view of the mechanism too much was actually quite tricky.

Also tricky was getting the rockers to consistently work. I spent a lot of time figuring out what dimensions to make them so that they would work correctly, even if two marbles arrive onto the rocker right on top of each other. I knew it was physically possible to build such a rocker, because the Lego rockers I built into the original Lego marble machine just happened to have this property. The trick turned out to be to make peak of the rocker, which deflects the marbles, short enough, and the rocker shallow enough. That way, if a marble arrives before the rocker has had a chance to flip, the previous marble, which is still on the rocker, will help to deflect the next marble onto the other side, even if the rocker has not yet flipped.

Another important element was to add a slider which allows a whole 'number' of marbles to be dropped into the adder simultaneously. The marbles are placed on the holes above the closed slider, and then the slider is pushed to release them all at once.

Another challenge was a mechanism to capture the output of the machine. I wanted the result to gather at the bottom of the machine. But during computation, the machine also needs to dump marbles whenever 1's turn in to zeros.

My solution was to make a result slider that is normally open, so that marbles can flow out of the machine. But when the result is to be dumped, this slider is slid close. A mechanism on the back of the machine then also forces all the toggles to flip left, which causes any stored marbles to fall out into the result position.

Note how the marbles must fall through a hole first before arriving at the output slider. This is very important, as these holes ensure the marbles are positioned correctly for the output. Otherwise, with some of the marbles falling down at high speed, it is likely that they would bounce out of the result hole.

Of course, a mechanism is also required to actually reset the toggles. To this effect, each toggle has a pin protruding through the backing plywood, which can be pulled to the left by a beam. This beam in turn is activated by the result slider. Thus, when the result slider is slid to the left, it closes the holes, and forces the toggles to flip to the left, which then causes the stored result to be dumped out of the adder.

The image at right shows the bottom side of the reset mechanism. At the bottom right of the image is a screw which is part of the output slider. When the output slider is slid all the way to the left (or right as seen from the back), the screw pushes the reset beam over. The reset beam moves in a parallelogram motion using two pieces of coat hanger wire links (one of which is shown in the image). A spring is attached to one of these to pull the reset beam back.

Individual pieces of copper are used to catch the pins of the sliders, so that these can be bent to fine adjust the mechanism. The pins for the bottom most toggles can be seen in the image at right. Note that the wooden blocks just below the copper wire catches are to give the pins (nails) that the toggles are hinged on a bit more substance to hold them. The plywood I used is only about 6 mm thick, so I couldn't rely on it to always hold the pins straight.

I used to have some Marble adders for sale but haven't built any lately.


Also check some of my other Wooden machines:



To my Woodworking website


Viewing all articles
Browse latest Browse all 10943

Trending Articles