Showing posts with label lego engineering. Show all posts
Showing posts with label lego engineering. Show all posts

Monday, September 17, 2007

A New Recipe for π

I've been working on a Difference Engine in Lego. A little derivative perhaps, but still a big challenge. For one thing, there's not that much construction detail at that site. For another, what little there is I'm ignoring. I want to try to solve this on my own.

I've made some progress, but my (borrowed) video camera is being cranky so I've been unable to record and post it. (Aside to person I borrowed it from: I'm just getting a black screen in record mode. Also a little red flashing light that I think is the button battery so I thought that was it. However recording suddenly started work despite that, but only for a few minutes. ???) Thus this post isn't about that.

When the Difference Engine actually is running, I thought it would be fun to have it calculate π. NO WAIT, LET ME FINISH!!! I know π is transcendental, meaning there is no polynomial for which π is the solution.

The point of the Difference Engine is that as you crank the handle, you calculate the value of the polynomial for higher and higher values of x. What I'd like is a polynomial such that for higher and higher x, the value is closer and closer to π.

So I just google for a polynomial that does that, right? I mean, there must be hundreds of them by now. No. There are none that I can find.

There are plenty of series approximations, however. For instance:

π = 1/1 - 1/3 + 1/5 - 1/7 + 1/9 - 1/11 +....

And with some series...es, it's possible to come up with an expression that the series sums to up to any given point. For instance, the sum of the first n odd numbers:

1 + 3 + 5 + 7 + .... 2n-1 = n2

So maybe one of the series approximations of π can be manipulated into a polynomial. Then I can use the Lego Difference Engine on that polynomial and crank out 2 or 3 digits.

However, I'm having a great deal of trouble with this (not that that indicates anything other than the fact that I'm really not that great at math). For one thing, I've concentrated my efforts on the simple-to-remember 1/1 - 1/3 + 1/5 approach. But I just realized this morning that this series alternately overshoots and undershoots the target, meaning it has an infinite number of humps and valleys. A polynomial of degree n can have a maximum of n-1 humps and valleys, AFAIK, so that series is out.

If I'm going to start from a series, I need one that's always more or less than π and never the other. Or an entirely different idea. I can think of plenty of iterative methods, but that's basically just a series. I need a single step where the accuracy is chosen by the value of x I input. Since I haven't been able to find any reference to such a thing, I'm thinking it hasn't ever been done. Is that because it's impossible?

Tuesday, September 4, 2007

Lego Marble Pump II: Handcranked Bugaloo

The basic idea behind the Lego marble pump is working. I cobbled it together well enough to demonstrate My Vision, but many kinks remain to be worked out. For instance, the little levers need to be worked automatically. But I'm not going to do that, I'm just going to post the video of it hobbling along.

In case that isn't clear:

  1. Marble goes in ramp at left
  2. Cam on central carriage hits lever to open gate, allowing marble into carriage (part of cam played by my finger)
  3. Central carriage lifts, eventually dumping marble into next higher ramp (another "cam" lifts lever there to make sure gate is closed)
  4. Central carriage lowers, goto 2

Friday, August 24, 2007

Lego Marble Pump

This is a pretty neat machine. The core of the pump mechanism is pretty genius and I built one myself based on that graphic. The problem is that the tower can only be as high as the number of marbles you have and the number of marbles your motor can lift.

The most common way of lifting balls in a contraption is with a kind of one-way elevator. But I've already built one of those. This guy has an interesting idea. It's a little hard to see in the video, but he's got the marble going both ways through the pistons. It lifts one "story" going from left to right, then another story from right to left.

That gave me an idea. First of all, why not any number of stories? And second of all, why three pistons? Probably the answer to both is: maximum height for the amount of Lego he had.

I'm thinking you could put just one piston between two towers and with a certain amount of mechanical futzing pump the marbles up to any height.

*pause for 24 hours of trying to get some kind of Lego CAD software working on any computer in my house or office to illustrate this and failing miserably*

OK, here's the basic idea: The piston in the middle has ramps inside. The marble starts off at the bottom of one of the side towers. It rolls into the piston down one of the ramps and it stopped against the wall of the other tower. The piston moves up and there's a little nook in the other tower that the marble falls into. The piston lowers. Now there's another internal ramp, this time pointed the other direction, aligned with the nook, so the marble re-enters the piston and is stopped against the wall of the first tower. Repeat.

It's a little tricky, though. The nook is the problem. The marble needs to roll out of a ramp into the nook but then roll out of the nook into a ramp. The three piston video solved this by having good timing and long ramps. I don't have long ramps or the patience to get the timing right. What I'm trying right now is a kind of teeter-totter arrangement in the nook that tips up to receive the marble and then tips down to release it.

Oh cripes. I just re-read this entry and even I was too bored by the last two paragraphs to pay attention to them. I'll just have to make it work and post a video. Or somehow get LDraw working.

Wednesday, August 1, 2007

Locomotive Lego Linkage

It seems like I keep having to reinvent this linkage. The basic idea is that I want to turn a crank (i.e. rotary motion) which makes something move back and forth (i.e. linear motion). You see this exact same linkage on classic train wheels, though in that case the linear motion is the primary mover and it is turning into rotary motion to move the train.

In fact, almost all piston engines do this same thing. What I keep not realizing is that you need to hold the straight part straight or it doesn't work. Not "it doesn't go straight" but not work at all.

Let me show you what I mean

I think the reason I keep forgetting this is that the movement looks so smooth. It doesn't seem like there could be that much friction there, but there must be. The piston is rubbing against the sides. Not (just) because of a tight fit, but out of sheer necessity to make the piston run straight.

There are linkages that have been invented that can convert rotary motion to linear without all the side friction. For instance, here. A 3D version of that linkage is in the Boston Museum of Science. Another picture of Peaucellier is here and the page also calls my "locomotive linkage" a "sewing machine".

Peaucellier isn't very practical because it requires so many parts, which take up space and can fail. Or can it be made simply? Can another practical, mathematically accurate, low-friction linkage be built? In Lego?