Monday, December 1, 2008

PROP6502 Laptop Project

I made a laptop. It won honorable mention in the Parallax 2008 Propeller Design Contest. The point of the contest was to do something that shows off the unique capabilities of the Propeller microcontroller. I made a 6502-based laptop that uses the Propeller as its "chipset". I started with a toy laptop, and replaced all of the electronics with my own design to make it into a real working computer.

The screen is a 5.5 inch LCD TV for the laptop screen. The video decoder board, which was piggybacked on the LCD, made too tall a stack to fit inside the screen. After watching this presentation about modding by Benjamin Heckendorn, I decided not to try to make the laptop thicker. He gives the advice that you have to pick a height constraint and stick to it or else your project will grow to be "the Marvel Mystery House." Instead I figured out a way to unfolded the TV circuit board flat and place it below (not behind) the screen. Unfortunately that makes the LCD sit very high up the lid, so I made a nice decorative faceplate to distract the eye from how high and small the screen is.

The battery holder is embedded face up in the bottom so I wouldn't have to fashion a battery cover; the lid keeps the batteries in place when the laptop is closed.

Inside the laptop: at the top of the picture you see the back of the keyboard. In the second row, components from left to right: the keyboard decoder, back of the battery holder, and the CPU board. (More on the CPU board in a minute.) This toy laptop had a QWERTY keyboard, but it was not PS/2. Decoding this key matrix with the Propeller would be a waste of I/O pins. I realized that all keyboards are key matrices, including standard computer keyboards. So I simply cut the circuit board out of a real PS/2 keyboard from a Dell PC, and soldered the toy keyboard to the PS/2 board! The fact that that actually works (it does work!) is hilarious. Of course the key codes generated will be different; for instance pressing "A" might make the PS/2 board think you are pressing "X", but I simply translate the keycodes in software.

The laptop is based on a 6502 processor. I used the Propeller microcontroller as the "chipset" for the computer. The Propeller provides video, I/O, and memory control. The 6502 addresses a 64K static RAM chip, and the Propeller manipulates the control signals in order to load the initial program and monitor the address and data buses. Reducing chip count was key to making this board fit inside the laptop shell.

The reason I was able to do it with so few chips is a combination of the Propeller microcontroller's versatility, and a neat timing trick that allowed me to multiplex the data bus. After reading how old 6502 computers interleaved video access with processor accesses on the same bus, I realized I could use the same technique to allow the Propeller to access the bus in the interim period between each 6502 bus cycle. Since the 6502 puts the address out before the data is read or written, the Propeller can quickly transfer the 16 bit address onto the 8 bit data bus in two transfers, and still finish in time to return the data bus to a "normal" state so that the 6502 never knows anything happened.

What I learned from this project is that pins and signals are ways of dividing up the physical dimensions, but you can also think of time as a dimension that can be sliced up and parceled out. Making use of this extra dimension in a design can allow you to fold a complex system into a smaller physical space than it would seem to fit.

Once you've pared down your design, you've still got to wire it, and even a simple computer involves a nightmare of wiring. This part is harder than choosing the right chips to wire in the first place!

In a closely packed board, you can have a problem wiring it just from the sheer mass of copper packed into each square inch. I used strips cut from 80 conductor IDE ribbon cables to wire up the board. (Credit to Benjamin Heckendorn for giving this advice as well, in the same presentation I mentioned above.) These extremely thin IDE cable wires allowed me to pack more wiring into a smaller space, and it makes the wiring neater when you can group 4 or 8 together into ribbon cables.

This project gave me an excuse to finally use my Fluke 9010A Microcomputer Troubleshooter (pictured, front and center). My friend and former teacher, Earl Martin, once told me there were only ever two pieces of electronics equipment he wanted his whole life. One is a multichannel logic analyzer; the other is this Fluke 9010A, which he gave to me.

What this unit allows you to do is plug in to the CPU socket of a computer and exercise control of any aspect of the computer. You can test bus signals, read/write memory, even run programs and break on conditions. Technically it's an in-circuit emulator, but that term doesn't begin to cover the depth of what this tool can do. I would not have even attempted this project without it.

I had hoped to get better than honorable mention, but at least I'm on the same web page with the other winners, and received a $100 prize. I took the prize payment in the form of $100 of Parallax electronics components. I used the prize from this contest to buy parts for my project for next year's Propeller design contest: Norbert 2.0, a Propeller-controlled mobile Lego robot with a 5-degree of freedom manipulator arm. See you next time!

Monday, September 1, 2008

Success at Last: Wireless on the Freerunner with Om2008

Since I lose the USB network device when the Freerunner powers down, it would be helpful if I set up Ubuntu to automatically reconfigure the device when it does come back online. I haven't tested if that would unstick a frozen SSH session, but it might. Unfortunately I read Ubuntu has a bug that makes the reconnect not work.

The fix isn't exactly hard but before I did that, I decided to give my Freerunner's wifi configuration another try. It turns out the reason I couldn't get wifi to work before was due to a really silly thing. In the new keyboard app in Om2008, it shows what word it thinks you're typing, but it doesn't actually enter it unless you tap on the word. Whenever I tried to enter my WPA password, I would see the word suggestion from the keyboard app right below the blank password textbox, and I thought I was typing in the password box. Actually I hadn't entered anything yet because I didn't click on the word. Once I figured that out, I was able to connect to my wifi network.

But how to be sure that I was connected? I hit upon the idea of going into my router configuration to see if it had assigned a DHCP address to my Freerunner. Sure enough, there it was, and now I knew what IP to type in to ssh to it. Having wifi working solves some of my problems I had with USB networking. Even though my ssh session still freezes when the Freerunner goes into standby, the ssh session also unfreezes when I wake the phone back up, so I can continue where I left off while working. Still trying to figure out how to fix the shutdown problem.

Once you have wifi connected, you should be able to ping internet IP addresses, but DNS doesn't work yet because the Freerunner doesn't know your DNS server. I followed the instructions from the USB networking page to set up DNS, using the address of my router, as that part of the instructions works equally well for wifi networking as it does for USB networking.

Once DNS works, then the package manager works. I still haven't figured out the suspend problem.

Update: I must have missed that in the known issues for Om2008, they said that the builds from the last days of August (which I'm using) have to have the X screensaver disabled. The fix is to run the command "xset s off". What they didn't mention (and since it's a wiki, I was able to fix it for them :) ) is that you can't run xset from the ssh session, you have to install the terminal app (after getting DNS working) and run the command on the phone itself.

Sunday, August 31, 2008

USB Networking on the Neo Freerunner

Well the new version of the open moko software isn't much better; they changed a lot in the interface but it still has some serious bugs.

This version of the software has a bug that causes my phone to suspend every 30 seconds when the USB cable is connected, even if you have suspend set to "disabled". Guys you have GOT to fix these bugs! Seriously. I was honestly better off before I upgraded, in terms of reliability.

In order to do much with the Neo Freerunner, you really have to have USB networking set up. I found some instructions that work nicely on Ubuntu. However, if the phone suspends at any time during the process (as mine does constantly due to the bug I was talking about), then -poof- your USB device magically goes away and you lose your ifconfig settings or crash your ssh session!

Unfortunately you have to have USB networking set up in order to run the install scripts to put Debian onto the SD card. Maybe I can type in a command that will force it not to suspend, but I have to do it faster than thirty seconds over SSH because it looks like they took the terminal app out of the newer release. (The one thing that was actually any good in the old release, and they take it out? WTF?)

I'm almost ready to flash Qtopia over the open moko software and forget about it, but I did really want to see what apps the open moko distribution would have available if I could get networking so the package manager will work.

My Neo Freerunner Arrives

It's here! It's finally here! My Secret Decoder Ring Neo Freerunner!

When you open the box, you're greeted by a quote from the Tao De Ching. I keep that same book on my desk. How cool is that?

The quote seems to be about the empty hole in the bottom of the phone. Funny, I figured that was where the rope goes.

Here's what you get in the box: a stylus, USB cable, a charger with plugs for various countries, and a 512MB SD card. The back side of the green card says "Thank you for your efforts to Free The Phone."

The Neo Freerunner comes with the coolest stylus I've ever seen. On the top side of the device is a laser pointer and a bright LED flashlight. The bottom of the device has a clever mechanism which when twisted one way extends a plastic stylus tip, but when twisted the other way reveals a ballpoint pen tip. Not quite a Sonic Screwdriver but close! I ended up using the flashlight on this thing just a few hours later when a thunderstorm knocked our light out.

The display on the phone is really quite beautiful.

Getting the OpenMoko

As our cell phone contracts expire soon, I wanted to take the opportunity to get a phone that I can hack the software on (I've been quite frustrated by the horrible software on my Sprint phone). I've wanted an OpenMoko Freerunner phone because it runs Linux and you have true freedom to change the software on the phone as you like, but I wasn't sure if I could convince my wife we should spend money on it. She surprised me, however, by promising me one for my birthday!

Actually buying an OpenMoko Freerunner turns out to be a bit difficult. The "Store" section of the openmoko site simply showed "Sold Out" with a claim that more phones would be coming in July, but it was already August and they hadn't updated that message. You have to go through one of their 3rd-party distributors. There's a catch: the only US 3rd-party distributor (GP2X) doesn't actually sell the latest version of the phone!! They are selling the Neo 1973, which is a prototype to the Neo Freerunner. Due to the similar sounding names, it would be easy to accidently buy the older hardware, which lacks some features and already isn't always supported in newer software releases. Read carefully before you buy!

As of today when I look on the site, it seems you can now buy the new phones directly from OpenMoko, but when we ordered mine earlier this month, the only place that had it was the Canadian distributor, Koolu. Having never bought anything from another country before, my wife and I were unsure how to pay for something in Canadian dollars with a US checking account, but it turns out the exchange rate is all handled automatically. We didn't have any problems with the Canadian company, Koolu, but we had a string of problems trying to go through the US company PayPal to get the phone paid for. First PayPal froze my wife's PayPal account because they flagged it as suspicious activity (because it was my wife's name on the account but the ship to was my name). After jumping through a bunch of arbitrary hoops to get my wife's PayPal account unlocked, PayPal dropped the transaction anyway because too much time had passed. So I ended up buying the phone on my account and PayPal ran it as an echeck instead of a credit card, which is not what I wanted. It turns out if you are PayPal customer, there is no way to tell PayPal to run it as credit, even though if you are not a PayPal customer, PayPal will run it as credit! What kind of crap company denies a service to their members that they will give to nonmembers? So I canceled the original transaction and re-ran it as credit and not as a PayPal member, and finally got the phone. However, instead of refunding my first transaction, PayPal double charged me, wiping out my bank account. The funds PayPal sucked from my bank account were there in my PayPal account, true, but I had only intended to pass money through PayPal, not deposit it there. PayPal wasn't going to return my money from the canceled transaction unless I specifically asked for it back. As long as I don't notice what they did, PayPal effectively had an interest-free loan from me. Bastards.

Monday, August 25, 2008

I Feel Stupid And Triumphant

For years I haven't been able to run Linux on my laptop because my wireless card is not supported on Ubuntu. Dell used several different Broadcom chipsets in different runs of the laptop I got, and I had the bad luck to get the ONE chipset that is completely unsupported on Linux. The model stepping BEFORE this wireless card works, and the one after, but this one just proved to be too tough a nut to crack for the Linux driver people. By a ridiculous stroke of bad luck it ALSO has a Windows driver which can't be used with the NDIS wrapper. Trust me I've tried everything; many sleepless nights to no avail.

But in an unrelated project, I've been playing with these WRAP PC Engines router boards that I got for free because they were lightning damaged. A couple of them had mini-PCI wireless cards attached to them. These cards use Atheros chipsets, which are the most well-supported wireless chips under Linux. They would fit in my laptop, but I didn't think they worked because I could never get them to work in any of the WRAP boards. Plus I imagined tearing down the laptop to find the wireless card inside it would be a pain in the butt, so I put off actually swapping in a card to check if it worked.

When I upgraded the RAM in my laptop today I found out that the wireless card is not hidden in the bowels of the machine; it's just located under the same access panel with the RAM! I also had had the WRAP boards out and I noticed that the Atheros wireless cards I had weren't just crappy wireless "B" cards, they were really wireless "G". So I finally swapped one in and it worked! I'm writing this post from Ubuntu Linux now on my laptop, wirelessly! Yipee!

Then I realized that I could have done this six months ago. Now I feel stupid.

Sunday, August 24, 2008

C++ Iterators

A friend of mine and I are collaborating on a game in the C++ programming language. The part I'm writing is a general purpose engine that will be used on both the game server and the game client, so I decided to use templates to allow basic game objects to be replaced with entirely different classes in the client and server, yet still use all the same code on top of them.

In the process of moving my code from regular classes to template classes, I uncovered a fundamental language wart or compiler flaw. It has to do with a problem I ran into using STL iterators. Before I go into what the problem is, let me explain iterators a bit.

The people who wrote C++'s standard template library want to break you of the habit of writing things like:

for (int i=0; i < vec.size(); i++)

Instead you should write this:

for (vector< int >::iterator i=vec.begin(); i != vec.end(); i++)

Do you see the improvement? No? It's supposed to simplify code for traversing containers--except that it's twice as much typing! OK, well it also gives your code portability to use different containers besides vector ...theoretically... except that we have to specify "vector" directly in the for loop to say what kind of iterator it is! Oops.

The real motivation behind iterators is that it unifies the concepts for the people who write the container classes. I won't say the users of the container classes can't use iterators in ways that also provide benefit, but the users also bear a burden of extra boilerplate that adds as much work as it saves. This is the sort of thing Bjarne Stroustroup means when he talks about the compiler vendors and library/tools group being overrepresented on the C++ standards committee compared to actual users of C++. At least we users are finally going to get the auto keyword in C++0x, which will allow us to just write the word "auto" in place of the vector::iterator gobbledygook.

But being the good little C++ citizen that I am, I've taken the trouble to use iterators in all my code, even if it is a lot more typing. That's how when I moved my engine definition into templates, I got burned badly.

Where before I had this:

for (vector< GameObj >::iterator i=vec.begin(); i != vec.end(); i++)

I now have:

template < typename T >
... ...
for (vector< T >::iterator i=vec.begin(); i != vec.end(); i++)

What is supposed to happen is that when I instantiate the code with T=GameObj or T=OtherGameObj, the code will get built at the point I instantiated it and the result of the latter will look like the former except with either GameObj or OtherGameObj substituted for T.

Instead, it turns out that you can't (at least on my compiler) use a template argument like T to specify the type argument to a container iterator. You can declare the container using that T, but you cannot access the iterator of the container you just created! On some containers like vector you can just go back to the old notation, but for containers like map<>, iterators are the only way to loop over the container. This is a Really F*ing Big Problem. This is like laying the foundation for a building and realizing you didn't leave room in the floor plan for any doors. The irony is that iterators from the standard template library don't work with template arguments! This is like forgetting to leave room for doors in the plans for a f*ing door factory!

Thursday, July 31, 2008

Host Offline

I was trying to think of a catchy title for my first post after being away so long. Due some ironic glitch in my blogging software, "Host Offline" appeared as the default text in the title box. Why, yes, I have been!

I've had so much going on that I haven't had any time to blog about it! In the last two months I graduated college, moved, got married, and started a new job. My routine changed a lot and I haven't figured out where blogging fits in to it. Two a.m. used to be my prime writing time, but these days I'm in bed by ten so I can get up early for work. I almost decided to give up this blog, but I found out my father reads it (hi dad!), so I think I'll give it another go.

Life's been great. Melissa and I had a beautiful wedding, no family members disowned each other over the wedding planning stress, and then we had a wonderful week in Jamaica to unwind. (I'll put some wedding pictures up... eventually...) When I got back I started my new job as a programmer for an insurance company and it's turned out to be a good gig, they run a clean shop and treat people right. The only unfortunate thing is that I work during the day and Melissa works at night (she's a nurse). Our hours mean I leave for work before she gets home, and she leaves just as I get home.

Melissa found us a nice apartment in Norman, which IMO is the best city in Oklahoma. I got all my stuff moved up here and - this is really shocking: I'm actually organized! Kinda. I'm still a big pack rat and leave a lot of clutter around, but all my junk box goodies are in individual draws, bins, or containers. If you name something, I can lay my hands on it in 2 minutes without rummaging. I had had a week off by myself before the wedding, and I busted ass to get my organization project finished then because it could be years before I get another opportunity like that. While sorting my 100's of TTL chips into individual bins by part number, I suddenly remembered that I had actually started sorting them 10 years ago, and hadn't finished. So this is a once-in-a-decade event.

These days I'm working on a MMO game engine, and hand-wiring an 8-bit computer, among other things, on evenings when my wife is at work. I used to think it was not possible to get anything constructive done in short shifts, but I've actually gotten pretty good at working on my projects now for just 30 minutes or an hour at a time. Having my junk box organized helps.

Tuesday, May 20, 2008

My New Old 64-bit AMD

It might be a sign it's time to upgrade when you find a better computer in the dumpster!

Melissa (my future wife) and I just moved to a nice little apartment in Norman. One of the perks of living in "the city" is people throw out way better stuff here. Just our first day in the apartment I spotted a computer tower sitting next to the dumpster. I was surprised Melissa didn't say anything when I came back from taking out the trash, carrying something larger back into the house than what was in the bag when I went out. She rolled her eyes but let me keep my new little "toy". Maybe she's used to it by now, or just tired of trying to talk me out of it! Because I'm a bit of a junk collector - it runs in the family. But I just get such a charge out of taking things that were broken/worthless and turning them into something that can be used.

This one was a real find - a 64 bit AMD Athlon 3200+; only a few years old. I was hoping it was a dual-core; it wasn't, but the board supports one, and as it is this processor is still slightly faster than my current best computer (a 2.6 GHz Pentium 4). Even though the clock speed of my Pentium is greater, AMD chips get more work done in each clock cycle, and this AMD one is 64 bit vs. my old one which is only 32 bit.

I can only imagine what kind of hot rig the previous owner must have if he throws away a good 64 bit machine! Perhaps he thought it was broken? Dead computers are almost always salvageable; usually a dying hard drive or finicky power supply is the only ailment, but I guess owners get so frustrated with such problems that they get pissed and throw out the whole thing. Or they don't understand that the CPU tower has interchangeable components inside it, many of which contain no moving parts and theoretically never wear out. This guy obviously knew at least a little about computers, because he removed the RAM, which I was sad to see missing because I'm always short of DDR sticks.

I cannibalized some RAM from one of my other computers, and I'm super excited now because the junk-computer seems to work fine!

In order to furnish this new computer, I'm going to basically split my best computer in half and make two: my best computer had 2 GB of RAM and matched hard drives in a mirror RAID; so I'm just going to put 1 GB of RAM in each and break the mirror. Sure it was fun setting up the mirror RAID a few months ago... (What am I saying? It was a pain in the ass setting up a software RAID to work with both Windows and Linux! Way more trouble than it's worth!) Anyhow as I was saying it's been fun playing with a RAID, but I can get more use out of the drives separately at the moment.

(Gosh, how do you break a mirror RAID? Do you just yank out one drive and just make the system deal with it?)

Unfortunately there'll be no pictures of this project. My beat up old camera finally died its last death. Cracked LCD, confused CPU, and it won't stay on anymore no matter how high I boost the voltage (it previously had an undervolt problem that I fixed by adding a 3rd battery). Even I can't fix it.

Sunday, April 27, 2008

Mountain Bike to Road Bike Conversion

Since my '63 Huffy was stolen, I've been saving parts for a new bicycle. I wanted another road bike, but all I found was a used mountain bike. I hate mountain bikes! Still, it was in good shape, so I bought it. When a derelict road bike showed up at the dump, I combined them to make the bike I really wanted. The Frankenbike! Skinny wheels, drop handlebars, and a big ironic sticker on it that says "Mountain Bike".

It has a thick steel frame and extra low gears from the mountain bike. The cargo rack came from the junk bike; I need to paint it. Did I say I was making a road bike? Maybe I mean touring bike. This thing's a tank! But I like to ride slow and steady anyway.

My original intent was to just swap wheels, but the donor road bike was a real wreck - rusty frame, taco-ed wheels, and seized bearings had eaten the hubs. With the rims I wanted to use attached to bad hubs, and rims I didn't want attached to my good hubs, I hatched a plan I figured was either mad or brilliant. Knowing nothing about wheel lacing or truing, I decided I'd take all the spokes out of the wheels, and transplant the good mountain bike hubs into the road bike rims.

When I tried to lace the new hubs into the road rims, I found the road bike rims have a larger inside diameter. It wasn't much, but it was enough that the mountain bike spokes wouldn't reach. I needed to use at least some mountain bike spokes, because a few of the road bike spokes were broken. Usually when you lace wheels, you pick a lacing pattern and buy spokes the right length. I needed to find lacing patterns that used the random combination of lengths I already had!

I found a site which described the Crow's Foot pattern. This was perfect for what I needed, as I could use the shorter mountain bike spoke for the radial spokes, and the longer road bike spokes for the two crossing "toes". The pattern looks nice and it's very stiff. In this picture, you can see the distinctive 3-spoke crossings of the crow's foot.

That's a front fork but it's got a rear wheel hub stuck in it, sans gears. The mountain bike spokes were just too short, even for Crow's Foot. But a rear wheel hub has a larger diameter than a front wheel hub; it gets these shorter spokes closer to rim, just enough to make it work. Of course that caused problems all its own. A rear hub is wider than a front hub, which means the front fork isn't wide enough to go around the cone nuts. I didn't want to bend the forks out, so I had to bring the cone nuts in. Using the angle grinder and nerves of steel, I cut the cone nuts down to mere slivers, leaving only the sloped bearing race. I cut them so thin I could fit both them and the nuts that lock them within the forks. I also had to notch the axle bolt so it would slip into the smaller fork holes.

Despite the difficulties, using a rear hub for the front wheel is a great mod. Front wheel hubs are narrow and use smaller bearings on a smaller axle. Why? You'd think the front wheel is the one you'd least want to wobble, and it will take the brunt of any crash. Rear hubs, being wider, place the bearings further apart, so play in the bearings has less effect at the rim than with narrow hubs. It gives a steeper dish to the spokes, which also resists side to side forces better. And this hub has uncaged bearings, more of them, in a larger race. The difference is noticeable. There is zero wobble. None. It rides like it's on rails.

Funny story about the bearings. I tried the smaller axle from the old front hub to see if it would hold the large bearings in. It didn't, and the bearings went bouncing all over my shop. I recovered all but one of the bearings. When I finally found that last bearing, I noticed it had hole drilled through it. I'd never seen that before, and I couldn't figure out why someone would make a bearing with a hole in it! But it was clearly one of the right bearings - it was the same size as all the others, and the same shiny silver color. Maybe the hole was so it would retain grease? I shrugged and put it into the race with the others. Well the next day I found the missing bearing. I thought, if I'm holding the missing bearing in my hand, what the crap did I put into the bearing race yesterday? I removed the bearing with the hole in it and scratched it. Silver paint flaked off. What I had was one of those metalized plastic beads they use for craft necklaces! By chance it happened to be on the floor in the same place I dropped my bearings! I don't know what would have happened if I'd left it in, but the wheel turned fine with a plastic bearing.

For the rear wheel, I used Crow's Foot on one side, and made up my own pattern for the other. I came up with a daring plan to use an unbalanced lacing pattern. There are two forward-pulling spokes for every one backward-pulling spoke. The idea is that when you're pedalling, there are two spokes transmitting your torque to the ground for every one that's not. Does it lead to the wheel twisting under load? It's hard to be sure because the rim was already bent when I got it. But I've been riding it like this and haven't had a problem. I call it the "Dreamcatcher" lacing pattern; the spokes weave many times.

I didn't want to restring the shifter cables, so I kept the original shifters. Unfortunately they were designed for a straight bar. On the drop bars always the shift lever was blocked, or the cable interfered with the brakes or my hands. Putting them on the outside was the least bothersome place. I'm saving the two levers on the stem for clutch levers to engage the motors if I make the bike electric.

The handlebars had awful rubber grips that kept slipping off. I got rid of them and wrapped the handlebars with some good Cinelli cork tape. Not bad for my first try.

Well, that's my bicycle. There's nothing like riding a bike knowing every piece that makes up the whole is there because you chose it, not the factory.

Thursday, April 24, 2008

Ferron's Guaranteed No Mess No Mixups Method for Swapping Rims without Relacing

I'm restoring my fiancée's bicycle. The hub and spokes are ok, but the bottom of the rims once sat in a puddle until they rusted out. Luckily I had a spare pair of rims left over from my last bicycle project.

It's fairly easy to de-lace a wheel. But getting the lacing right when you put the new rims on looks really hard! All those criss-crossings and spokes going alternating ways... Who can keep track of it? And if you miss a spoke, you'll throw off the whole process. I found websites which provide wheel lacing patterns, but I've got a much easier way than lacing from scratch.

The basic idea is that you only transfer one lace at a time. You copy the pattern from the old wheel step by step, and you'll never miss a spoke.

Start by holding the two wheels side-by-side between your knees. Make sure the right side spoke holes in one wheel are next to the right side holes in the other, and the left are by the left. As seen in this picture, the valve holes might not line up although the left-right spoke holes do.

With a flat head bit, completely unscrew a left side nipple.

Move the spoke over to the other rim and screw it in loosely.

Spokes which cross underneath are blocked by the ones on top. Always transfer the spoke that crosses on top first, then transfer the one that crossed under it.

As you go around transfering each left side spoke, loosen but do not remove each right side nipple.

Save any extra nipples you can get off other wheels, because you will most likely round off a few nipples during the transfer, and you'll need to replace them.

When you've transferred all the left side spokes, you will end up with this. If you welded these rims together, you could make a monster "dualie" mountain bike!

Now work around the wheel and transfer the remaining right side spokes one by one. Except this time, transfer the one that crosses under first, so it will reach, then do the one that crossed over.

Ta-da! Now the old rim is free, and the spokes are all in the new rim. Yet you never undid more than one spoke at a time. Magic!

Don't try to ride it yet! You still need to true the wheel. I'll explain in another post the technique I came up with to true my wheels without special equipment.

Just wanted to extend a little link-love out to Nick Johnson's When I first started reading his blog, I expected it to really take off, so I've been surprised by how few comments I've seen around there. If you enjoy reading about electronics projects, building things on the cheap, and the occasional post about bicycles, then you'll really enjoy Check it out, and leave a message if you like it! That's how we know whether or not anyone reads the stuff we write.

Bicycle Shop

In March I finally cleaned out my basement so I'd have a place where I can work on my bicycles. I have an alcove that's just right for parking one or two bikes by the door so I can easily wheel them outside.

I even have a cool sign!
(Disclaimer: I do not run a real bicycle shop!)

Since clearing this shop space I've already completed 1 1/2 bicycle projects! I'll post about them soon.

Let's Do The Time Warp Again

This morning it was 7 o'clock three times in a row! Wow!

Clearly I must be caught in a Time Loop! So I did what any sensible person should do when they're caught in a time loop; I went back to sleep!

Later I discovered this switch on the top of my clock. It was on "alarm set".


Tuesday, March 4, 2008

Small Form Factor Case Mod

I wanted to build a custom firewall/router PC. Something small and compact, and which would use up some of my old computer parts.

Let's see what we have to work with?

What a ridiculously bulbous case! No wonder Packard-Bell went out of business.

Ah, that's better: The metal part of the case isn't too bad. We can work with this!

Drives? Who needs 'em! With the drive bay cut off, I shortened the case by a third. Then I used new rivets to attach the old top at the new height. Very clean - looks almost stock.

Unfortunately, the side panel now doesn't fit.

Mr. Side Panel, meet Mr. Angle Grinder.

I knew I'd never be able to cut a perfect edge with the grinder, so I riveted aluminium bar stock to make a skirt to stiffen the panel and mask the imperfection. If you can't make it, fake it!

Now I just need a face plate.

Look! A perfect fit - other than being ginormously tall. I really like the styling on this face plate better though.

We'll just cut it in half too. Uh oh... I didn't account for that big hole on the top of faceplate after it's cut.

What better way to fix the top of the faceplate than with the, er, top? The steel files in the background: I used those to trim the cuts so they'd glue together flush. I have mad skills with files. You can see here there's still going to be a seam no matter what I do.

Time to pull a design trick with the magician's old standby: indirection! Since I can't make the seam impossible to notice, I'll do the opposite and call attention to the area with a little decoration. Who knew strap iron could be so appealing? Earl Martin calls my style "industrial art deco," which I think has a nice ring to it.

Here's how I laid the parts out to fit them in such a small space.

The finished case mod in all it's glory, sitting as the capstone on my pyramid of computers.