Marble Computer Progress

Howdy, all! A couple days ago I finally booked some time on the laser to break ground on the marble computer I’ve been designing. This is the first physical test piece, two bits of an adder.


I stumbled almost accidentally on this design with an interior “track plane” sandwiched between two big “separation planes”, and I’m really happy with both the look and how easy it is to cut and assemble.

Each of the two wood toggles is a bit, representing 0 when it points left and 1 when it points right. Putting a marble in the top track adds 1, and inserting a marble half way down the left side adds 2. When the top bit flips from 1 to 0 (right to left), the marble goes down the left side track and “carries” to the next bit, incrementing it. In a larger adder, this carry action could continue through more bits until one of them flips left to right (0 to 1). At that point, the marble falls down the exit channel on the right side and into a sink.

I didn’t realize this with my test cuts, but I was running the laser at a speed just slow enough to barely cut through the material. So my final cut had a few places where it didn’t quite cut through. I wasn’t careful about my origin so I had to break the acrylic a bit to get the pieces out. Luckily I don’t think that’s noticeable, and I didn’t get any cracking. Another artifact of that is that the sides of the parts are angled, since more of the plastic melted at the top than at the bottom. For those with more acrylic experience, is that a normal artifact of lasering this material, or was that just because I was cutting too fast?

The front and back planes feel much stronger than I need. I’m thinking of getting thinner acrylic for those, to help cut the weight down. Does anyone have suggestions for thicknesses which are sturdy enough to stand on their own but still thin? I’m thinking of getting 0.1 inch (half the current thickness) if I can find that.

The next test will have another track plane on the layer behind, and switches connecting between multiple planes. I’ll post further updates in this thread!

5 Likes

So nice to see your work. Looks good. If you have time and desire I’d love to see a short video showing it processing several marbles.

1 Like

Can do! I couldn’t find a way to post a video on here, so I uploaded it to YouTube instead:

Awesome! Thanks for posting

That’s pretty cool. This will be fun to follow.

Update: Improved gates

The previous gate design had some pretty big flaws:

  • It had very inconsistent timing. Sometimes the marble would exit immediately, other times it would linger in the gate. You can see this a bit in the above video. Timing from entering the top gate to entering the bottom gate could be anywhere from 0.5 seconds to 1.5 seconds. The computer will ultimately use timing to determine when an operation is done, so this is too much variance and the worst case is too slow.
  • It would sometimes engage only halfway. The gate could “bounce” after flipping and end up not fully engaged in either direction. This could lead to a jam, either in the gate itself or in other connected gates (not built yet).

To fix these issues, I designed a new gate. The new one controls the movement of the ball more, and has a sharper exit angle to push the ball out. It also uses a second embedded marble as a counterweight to prevent bouncing, and make sure the gate is always entirely engaged.

To my delight, the new gate is extremely consistent! The time from entering the top gate to entering the bottom gate is almost exactly 0.57 seconds, every time. With a small buffer, this should allow an entire addition operation to happen in around 5 seconds, which is on target for my goal of 10 seconds per instruction.

4 Likes

Good progress over the weekend! Most of the time the marble spends in the above design is in the out-and-back segment between the gates. I wanted to see if I could shorten it by giving the top gate a steeper exit angle. Mostly due to luck, that worked beautifully, as shown in this extremely satisfying video at 1/8th speed:

With this gate and path, the time from entering the top gate to entering the bottom gate is down to 0.36 seconds! That speed would allow for a 3-second add. Further improvements are possible, but I think this is probably at the point where it’s no longer a bottleneck.

After that, I designed the “set” gate shape. If the set gate is 0 and a marble passes through it, it becomes 1. If it is already 1, it stays 1. The marble goes right if the gate changes, and left if it stayed the same.

Here it is in action:

And that should be all the fundamental shapes we need for logic. The unset gate is made by mirroring the set gate, and the inspect gate is made by using the flat side of the set gate on both sides, to make a gate that never moves on its own. These four shapes can be attached to one axle to form a bit in the ALU, capable of the four basic operations of this computer: Toggle bits (xor/add/not/decrement), set bits (or/ones), unset bits (and_not/zero), and inspect bits (store/display).

I think that’s about all the value I can get from this prototype. The next piece to prototype is the mechanism that takes a ball from the input and moves it to the plane with the right gate shape for the current operation.

4 Likes

Thank for your continued posts - what fun it will be!

1 Like

Ok, after much testing, prototype 2 is done! For this one, I wanted to pick a different part of the computer, but still using multiple layers and passing marbles between them. I also wanted to target a look closer to that of the final build. I think it turned out pretty well! Here’s a 360 shot:

This is a prototype marble decoder. It has two bits, which can be toggled separately by dropping marbles into the back plane. When a marble is dropped in the front, it can come out in any of the first four planes. The two bits select which one it will come out of. Here’s a full cycle of all four possibilities:

And that same cycle from the front:

In the final build, there will be eight of these stacked vertically, which route each bit of the input operand to the appropriate layer/operand of the ALU. The layer selection bits will be configured by the instruction.

I’ll bring this to the Laser SIG next week for anyone who wants to see it in person!

Next prototype will most likely be a few bits of instruction memory. Stay tuned!

6 Likes

Looking forward to seeing your work and you at the Laser SIG

1 Like

After a long wait, I finally have a new piece! This is a prototype for a larger-but-still-small build that I’m working on.

The piece is CNC cut on both sides out of a thick board of African Mahogany, and the gates are I think pine (I found a big chunk of light streaky wood in the scrap bin that was perfect!). The covers on both sides are laser cut acrylic, and the brass rods were cut to length in the metal shop.

Here’s a video explaining what it does:

This was my first CNC project. Huge thanks to @bwatt for spending a few hours helping me think through it and get comfortable on the machine!

The piece has pockets milled on both sides, with small slots peeking through from one side to the other. The design includes 1mm of clearance between the gates and the wall, so the slots milled from the front need to be aligned to within 1mm of the pocket on the back.

To line up the two sides, my plan was to use the holes in the corner of the piece to secure it, flip it, and then use the same holes screwing into the same places in the spoilboard.

I also had to add these spacers because the screws were a bit too long. Unfortunately, at the time I didn’t know how close the Safe Z Height was to the piece by default, and the machine crashed into one while moving, taking a nice chip out of my endmill xD

My endmill also wasn’t long enough to cut all the way through the outside of the piece, a fact I discovered when it went off-center and junked up the edge of my first attempt.

Luckily I had more wood, and a new plan: cut halfway through from each side.

For the second attempt, I got some better fitting 2” screws to secure the piece (which I left next to the other securing equipment in case anyone else faces the same problem), and cut the border halfway through. After flipping the piece, I cut the pocket on the other side and the other half of the border.

This revealed that the piece was misaligned by about 0.5mm, by creating an edge where the top and bottom edge cuts met. That was close enough to not affect functionality, and the edge was easy to sand off. However it’s large enough that some misalignment between the edge of the wood piece and the laser cut front and back plates is visible if you look closely. Since this is just a prototype, it’s good enough for now.

Next up I’m going to try finishing the wood with Danish Oil, to hopefully bring out a richer color, and then it’s on to making a larger calculator to hang on my wall!

3 Likes

Great to see your progress!

It might not be the precision you’re after, but your “junked up” edge just looks like it needs a flush trim router bit pass at the router table, and a bit of sanding. It won’t get you to perfect dimensions, but don’t let the outside surface finish get you down! There are always ways to cheat in woodworking :slight_smile:

Since you’re going for 1mm/0.5mm precision - are there any mechanically critical parts that are wood? I’m wondering how you could account for size changes with different humidity and temperature levels. I think the casing you have is not super critical at that scale - it seems like it would work with a range of cavity sizes, and the metal and plastic pieces are mechanically accurate.

Love the idea of your next prototype bring a worthy display piece! Good way to celebrate a milestone and enjoy seeing it. :heart:

1 Like

Thanks! Yeah, I thought about cleaning up the edge, but the rogue blade also tore out a couple of the tighter corners, which would have been harder to fix.

Wood warping issues are a good point that I should probably be thinking more about! The biggest risk is the slots and holes where the brass bars go through the wood. Significant friction in any of these can trap a marble in the machine, breaking it.

The slots only need to limit the rotation of the gate, so they have a larger clearance above and below the pin (0.5 mm on each side). (This is a lesson I learned the hard way on a previous project). But the holes hold the pin in place, so they are just barely large enough to prevent binding, 0.2mm larger than the pin in diameter.

Do you know of a way to estimate how much wood might warp locally? I’d love to figure out how much tolerance is actually necessary!

Try this calculator: Wood Movement Calculator

For a piece a foot wide, it’s usually a trivial amount. But at .2 mm clearance, maybe not!

You could always get out of the problem entirely with some precise brass bushings.

1 Like

@Spex_guy Here is the YouTube link I mentioned at the social last night - seemed like something you would like. :slight_smile:

1 Like

And I’m so “old school” I knew exactly what it was when the video started having begun work at IBM in 1971. Thanks for sharing.

2 Likes