Category Archive: Projects

Ubuntu Eee Tablet

I recently purchased an Eee Tablet from Woot. It came pre-installed with Windows 7 but I wanted to install Ubuntu to see how that would work. Much to my surprise, after a few days of tinkering I had a system that worked really as tablet. Below are my instructions for replicating what I did, you can probably do the whole thing in under 2 hours. These instructions are target at Windows 7 and Ubuntu 10.10, while they will probably work with other versions of each, be aware of any differences that may arise.

  1. Pre-setup
  2. Install Ubuntu
  3. Resolution and Touch-screen
  4. Configure Firefox
  5. UI
  6. Extras

Read the rest of this entry »

Escapement

I started this over Memorial day and finished it over Fourth of July. The final result was an escapement built out of Knex that harnessed the power of a 3 pound weight dropping 22 inches to drive a pendulum for 20 minutes. The initial build went quite quickly with a working model being built in about an hour. That first version only ran for about 4 minutes. Over the course of the first weekend I made several observations and improvements to get the running time up to 8 minutes. The easiest update to make was to increase the length of the pendulum. However, the original design included some weight at the end of the pendulum to lower the center of mass. A longer, lighter pendulum proved much more effective. The other major change that I made was to add a pulley to the weight, effectively doubling its running time. The problem this introduced was that the twine I was using would double up on itself on the winding rod and the outer windings were used up much faster.

After a few weeks of considering this, I made an adjustment that removed the central support for the winding rod. This gave me the full length of the rod to wind the string. This increased it’s running time to 12 minutes. However, the mechanism became far more picky. The reason for this was that as the point that suspended the weight moved (as the rope would unwind) the rod would flex. When that point was right in the middle, the rod would flex down causing the end with the ratchet gear to flex up and the escapement would skip. It took some time, but I was able to eventually fix this by doubling up the ratchet gear, making it weigh more and more likely to hit the escapement accurately.

The second to last improvement was to add a double pulley, again doubling it’s running time, except for the fact that the windings once again would double over. This gave me a run time of 15 minutes. The final improvement was to switch the string from a heavy twine over to fishing line. This meant that the string would not double over itself. Also, because the fishing line was so thin, I got more windings out of the same length.

The pendulum was of great interest. As noted, I could easily adjust the mechanism by changing the length of the pendulum. Over the course of the project it changed many times. The length seen in the pictures is not the longest version, but the longest version weighed too much for the double pulley and would jamb, so it was shortened. This followed the general trend; longer pendulums resulted in the mechanism running longer while shorter pendulums were more reliable. However, if a pendulum became much too short it would also jam by swinging all the way in one direction and locking the escapement.

Another piece of interesting note, I could tell where the center of mass of the pendulum was by watching the weight. As the weight descends, there is a small amount of lateral movement, normally this is so small that it cannot be noticed. However, when the weight is at the same height as the center of mass of the pendulum, these slight lateral movements become harmonic and the weight would begin to rock noticeably, After it descended past the center of mass, the rocking would increase.

Link to Pictures
Link to Movie

Update: After posting the original article I made a few updates. The first major update was to increase the pulley system from a double pulley to a triple pulley, doubling its run time. Before making this change I reduced the weight by half to make sure it would still run, however after making the change I found that the way the weight had shifted along with more moving parts (and more friction) it no longer ran. I had to increase some structural support because parts were shifting causing the main shaft to pinch. After that was worked out it ran a little, but would often die out. This was because the weight was so reduced that the friction of some of the pieces rubbing together was more than the weight could over come. To fix this, I put a piece at the end to position the main shaft. This piece met head-to-head with a very small profile which significantly reduced the friction.

I also changed the shape of the escapement. The left side prior to the change was position in such a way that when it was struck by the ratchet, it did not contribute to the pendulums swing. This was a major hit to my efficiency. I created a new structure that would contribute to the swing. This required a minor addition because the new half of the escapement was throwing the center of mass off. I added a counter weight to the opposite side and all is well. Below is a link to the updated movie. The pictures in the gallery have been updated as well.

Updated Escapement Movie

Update #2: The improvements I made to the escapement with my last update had to draw-backs. The first was that I still didn’t feel like I had an escapement that was particularly efficient. Every time the left prong was struck, it would flex and in doing so, lose energy. The second problem was that the new escapement performed better, and smoother and so the mechanism ran three minutes faster. I want it to run slower. So I started working on a redesign and came up with something I liked and fitted it onto the structure. It runs more efficiently, but also a bit longer (32 minutes running time).

Updated #2 Escapement Movie

Update #3: I did a major rebuild. More than doubled the height, nearly trippled the distance that the weights drop. I bought a bunch of gears online and incorporated those into the clock. You can see that the escapement is the same from the last update. In the video, around 0:30 you can see the gear train from the escapment through 2 stages of reduction to the weight. This design runs for around 3 hours.

Update #3 Escapement Movie

Dual Boot

I just wanted to a quick write up on this because I went through a lot of worrying and everything ended up just fine. When setting up a Linux/Windows dual boot, it’s best to install windows first, then put Linux on the machine. That’s easy. But I had a laptop I’d been using for two years with Ubuntu (I was on 9.10 at the time this happend) set up just how I wanted and I needed to install Windows. Here’s my experiance:

I used GParted to setup a partion for Windows 7. I rebooted and ran the Windows 7 install – which went smoothly. As expected, when I rebooted the computer it went right to Windows 7, no GRUB, no Ubuntu. I burnt a copy of Ubuntu to a DVD to use as a LiveCD. When that booted, I opened a terminal an typed:

sudo grub
>root (hd0, 0)
>setup (hd0)
>quit

And rebooted. Grub came up fine and went straight to Ubuntu, again, as expected. Once I was in Ubuntu, I opened the grub config file. There was a section for Windows which I uncommented and set to the correct drive partition. I rebooted, went to Grub and selected Windows.

This is where things didn’t go as expected. Instead of booting into Windows, I got a message ‘BOOTMGR is missing’. I spent two days trying to figure out what the correct next move was. I wasn’t quite sure what I needed to do, but I knew that the next step was to restore the Windows boot loader. I burned a Windows repair disc (I didn’t have my original Windows DVD with me at this point) and ran that. Much to my surprise (and joy) everything worked. I was now able to dual boot.

So if you are trying to install Windows onto a system that already has a Linux (at least Ubuntu) this is what worked for me.

Go

I’ve been working on this project since early summer and it’s finally ready for release. This is an online Go game. It is implimented entirely using JavaScriptm HTML and CSS for the front end. There is no Flash or Java. The back end is impliented in php with a mysql database.

The piece that I am very proud of was the formula to remove captured pieces. You can see a mostly complete implimentation of it here.

The interface is fairly simple. The first screen will show you what games are waiting for an opponent. If there are no opponents waiting, you will be propted to start a game. When both players are in the game, you will take turns placing pieces on the board. If you are unfamiliar with the game of Go, have a look at it’s rules and history (Wikipedia). If you leave the game or close the tab that the game is in, you will be able to come back, as long as you do not close your browser or start a new game. If at any point the game seems to be stuck, you can refresh the page, and it will not lose track of your game.

Unfortunatly, at this point, there is no automatic scoring set up. There is almost no way to give the ‘human’ score of the game. I may impliment and naive, true score at some point, but I am afraid that would detract from gameplay more than it would help.

Play the game

Flip

This was one of the first character based Blender animations I did. Simple five second clip of  a character doing a flip. I learned some of the details of armature manipulation, NLA curves and manipulation IPO handles. Enjoy.

Flip.avi

Gears

This was my first major project in Blender. It features twelve gears spinning together. Took forever to render on my old computer, but the final product was worth it. It’s compressed as Jpeg Avi, which not all programs can read. I’ve had luck with Quicktime, and my Linux laptop handles them just fine. Enjoy.

Gears Movie

LDL – Light Weight Data Language

Intro: Ldl is the lightweight data language. It is designed to convey data in a simple convienient way. This document is itself written to ldl specifications;

Objective{
Lightweight   : Ldl is designed to be lightweight. Interpreters can be written with very little code and with very little complexity.;
Human Readable: Ldl should not be difficult to read. With out knowing the specification, or having any programming experiance, a reader should be able to understand the data conveyed in an ldl document.
}

Rules{
Operators : There are 4 operators, left curly brace, right curly brace, colon and semi-colon.
Objects   : There are two ldl objects, containers and data. A container can hold other containers and data. A data object holds only data.
Container : A container is defined by a name, followed by curly braces around the containers contents.
Data      : Data id defined by a name followed by a colon, then the data terminating with a semi-colon. Data can contain curly braces and colons. The only character data cannot represent is a semi-colon.
Names     : The four operators cannot be used in names. All other characters, including spaces and newlines can be used.
Whitespace: Whitespace (spaces, tabs and newlines) before and after names is removed and can (and should) be used to format a document for readability. If the first character of data is a space or a newline, it is removed, all other whitespace in data is left intact.
}

Motivation: This standard was ispired to find a middle ground between XML and YAML, while being significantly simpiler than both. XML is a very complex standard that is perhaps unnecessarily verbose. Because of it’s use of whitespace, YAML is more of a challange to write a parser for, to the point that I would not classify it as inconsequential. YAML is also more complex than is needed. I believe that ldl simplifies writing a parser with out the expense of readability while embracing simplicity and YAGNI.

Questions you may have{
? {
Question: Why is there no escape character for the semi-colon?;
Answer  : Because in order to create an escape, I would have to add another operator and then check for representations of semi-colon or that operator. This not insignificat as it would increase the number of operators by 25% and greatly reduce readability. Try looking at html code with escape characters.;
}
? {
Question: Why aren’t more naming conventions enforced? It seems like people could come up with some very bad documents.;
Answer  : Yes, it would be possible to create some very poor documents, but any limitation implimented could just as easily block a good formation for a document while simultaneously generating more code.;
}
? {
Question: Why isn’t there some form of list? YAML and JSON both support lists.;
Answer  : It is possible to create lists in ldl, it is just not a part of the standard. YAML style lists denoted by a – would work just fine. I would even point out that these questions are part of a list denoted by questions marks.;
}
? {
Question: Why doesn’t LDL work while I’m making toast?;
Answer  : That is a stupid question. You should never have children.;
}
}

Find feature in ldl: The original implementation of an LDL parser included a find feature and while it is not part of the standard, I would strongly encourage a similar find feature as a bare minimum in order to make an LDL parser useful.

How Find Works: The find feature used to operators / and *. / represented layers of heirarch. So using the classic bookshelf example that is mandated by law to be used in all data representation examples, to find all book titles on the bookshelf you would search for “bookshelf/book/title”. To get all titles (say there are both books and cds on the shelf) we would search for “*title”. These can be combined to create some complex search criteria “*book/title” or “bookshelf/*title”.;

Links{
html Demo: http://projects.adamcolton.net/ldl/demo.html;
JavaScript Parser: http://projects.adamcolton.net/ldl/ldl.js;
LDL Document: http://projects.adamcolton.net/ldl/shelves_ldl.html;
PHP Parser: http://projects.adamcolton.net/ldl/ldl_php.html;
Python Parser: http://projects.adamcolton.net/ldl/ldl_py.html;
}