Electric Bike project part 2

In short, It works. I actually meant to post this in August, but forgot.

Here's the pre-debug final assembly

The thumb lever is a touch far away, but still comfortable to use.

The drive side. We never actually did anything to attach the small pulley to the motor sprocket. It's just a taper press fit. We'll pin it if it has trouble, but it works so far after a few trips.

a view of the fender washer mounting method

Brian taking it out for a spin. He had some trouble, and we ended up moving the motor assembly closer to the seat to gain a small amount of tension in the chain.

The new motor position.

I don't think ther've been many problems since the last adjustment

It was alot of fun to tool around.

All in all, a good finished project. Good thing too, since I promised to buy it if it didn't work.

If I were to do this again, I might get a bigger battery pack, though range doesn't seem to be a problem. Also, Try not to have bolt heads intersecting with the chain. It doesn't work that way.

Electric Bike project part 1

Brian and I decided to build him an electric bike conversion so he can ride his bike to work. The problem with the ride normally is a gigantic hill on the way home. Our goal was to boost him up the hills, while still allowing him to bike normally (except with a heavy bike).

We based the design off of Eric Peltzer's Electric Bicycle. We modified the design to take into account a few major differences. We didn't want to weld anything, we wanted it to be cheaper, and we have access to a waterjet cutter.

Brian purchased a XYD-13 motor kit, which is a 600W motor that normally goes on a Currie Electric scooter. It came with a speed controller, and we had an option for a twist grip, or a thumb control. We also ordered a shaft, bearings, etc from McMaster Carr, and a small set of 10Ah batteries and charger. If he doesn't get enough range on the bike, the plan is to upgrade the batteries.

The motor came with an excellent one-way clutch built into the sprocket. We decided to keep this, which allows the motor pulley to freewheel while the bike is being pedaled.

Last weekend, after we had waterjet out the motor assembly frame, we spent a few hours assembling:
Full Gallery Link
The motor assembly

Preparing the output scprocket

Mounting the output sprocket

The fruits of the days efforts

Remaining items:
  • modify and mount the smaller pulley
  • get shorter bolts for the output sprocket
  • find and mount the bike rack to hold everything up
  • install the batteries, controller, and thumb control



or, the Great Internet Migratory Box of Electronics Junk. I've signed up in the box request section because you never know what you can find.

Things I may be able to add to boxes (pictures and more updates to come later):
Blank Circuit Boards (up to 15" on a side)
ICs of all flavors
Character LCDs
Old graphic LCDs (10+ inch)
Ubicom (Scenix, Parallax) SX chips

I probably have enough to start my own box.


Geohashing FAIL

So, I've been wanting to do a Geohash for a while now. Particularly a Saturday 4:00 meetup. So where is the meetup this Sat? only 0.5 miles from my house! Yay!

View Larger Map
However, I FAIL because I'm going to be in Renton by 3:00. I should find some way to leave a note or something.


Seattle Regional

We had a great time at the Microsoft Seattle Regional. We placed 2nd out of 31, and we made it to the semi-finals. We had quite a few excellent matches, and I was very happy to have my friend Mike Bastoni in town to see it. I'll write more about it later, but I wanted to share this banner made by the database of TheBlueAlliance.net, which looks like a great resource for watching match videos of the events.

Team 1318

No video yet from the seattle event, but they are posting videos from all the events that have webcasts, and are actually only a few matches behind at any given moment. Be sure the check out the events live on webcast where possible. The Boston regional has some very strong teams at the top of the list, and a few matches in Hawaii today made it clear that there were a number of teams that had won previous regionals present.

Worlds are going to be exciting.


Gas Receipts

I had a really bad habit of just keeping the gas receipts in the cupholder in our car. I finally brought them in and started recreating my old calculation spreadsheet. I even collected all the proper data on each receipt. Amazingly, I was only missing 3 receipts over the past year, and only one was damaged.

Google Spreadsheet

Yes, I had an entire year's worth of receipts in the cupholder. It was beginning to be difficult to shove more in.

Now I just need to find my old spreadsheet to recreate the first year or so of data. I think
I am missing all the data in between, though.

I am still averaging 47mpg in my 2005 Prius.


FIRST Robotics

This weekend is the Portland Regional for the 2008 FIRST competition. Every year, the FIRST Game Design Committee (GDC) designs a new game for the competition. Starting when the game is announced (First Sat in Jan, usually), teams of high school students have 6.5 weeks to design, build, and ship a robot that can compete. The aim of this whole thing is to introduce students to the wonders of Engineering, and all the associated fiddly bits like accounting, planning, organization, purchasing, CAD, finance, etc. Basically, they get to be an engineering company for 6 weeks. Good teams will do all the backend planning and finance (read: fundraising) before the 6 week "build season" starts. To help get them through this (somewhat difficult) task, teams are encouraged to build relationships with real engineering or technical companies. They are also encouraged to partner with their suppliers for help, discounts, machining, etc. This is where I come in.

I am working once again with the Issaquah Robotics Society on the 2008 robot. In 2006, I was asked to cut a few parts for the team since I work at a waterjet manufacturer. Team 1318 had 4 waterjet parts on the robot that year. In 2007, we had over 40 waterjet parts, and we were able to cut many of them during a tour. The students had a great time visiting the plant, and the demonstration lab let us use the machine to cut a series of parts that were ready to mount directly on the robot. You can see many of the parts in my gallery (We are the robot with purple bumpers around the outside). Most of the waterjet parts were brackets, though the notable exceptions are all visible in this picture. All of the claw parts, the 1318 logo bracket at the apex of the arm, and the main arm drive sprocket are waterjet. Not visible are the custom shaft adapters and motor mounts in the shoulder mechanism.
At the Portland regional in 2007, we made it all the way to Semifinals without breaking a single thing once the competition started. we did have to tighten two set screws at some point. This inadvertently won us a "Cleanest Pit" award from a fellow team, since we never actually had to get tools out.

This year, we have a pretty revolutionary robot, I think. The 2008 competition (video above) has a few classes of robot that can compete; hurdler, herder, and what we call "rabbit". We are not expecting many rabbit class robots. A random survey of robots on youtube seems to agree. Our robot (with a Monty Python killer rabbit on top) is shown to the right. The entire chassis is one single waterjet plate, with all other things bolted to it. Th rabbit has over 60 waterjet parts, and most of them are not brackets, like last year. There are two of everything; custom sprockets, custom timing pulleys, motor mounting plates, copper slip rings, and a bunch of parts that I can give you our name for, but that won't mean anything (bridge plates, brush retainers, the sandwich (8 parts for each copy)).
In this second view, you can see more of the wheel modules. Each wheel module has two wheels (basically just a wide wheel) and a 6:1 ratio belt/pulley combo attached to a 3500RPM (under load) torque-y motor. each wheel module is rotated by a smaller motor, and can rotate continuously 360 degrees. this allows us to translate sideways, pirouette, drive forward, or any combination of the three.

I honestly can go on for hours about our robot and all the waterjet parts. (Reference this CAD model for a better view). But the reason I am so passionate about the FIRST robotics competition is actually really simple to explain. I graduated from high school after spending four (three technically) years on a FIRST team, went directly to engineering school, got a degree in Electromechanical Engineering, and got a decent engineering job pretty much directly out of college. (Not to mention the 2+ years I worked at iRobot while in college). The program really prepares students for the real world. FIRST isn't a perfect program, but the constraints it puts on a project are very realistic. We are just starting a new project at work that will be done in three months. It will be very fast paced, and many people have to work together to make it happen, while still managing everything else the normally do. This is exactly what I've been trained for, and this is exactly what I'm trying to impart to the students I work with. Even the equipment we make at work (the X-Y machine portion) is very similar to the robots they build. There is a central controller, some small motor controllers (amplifiers to the machining world), a few different types of motors and solenoids. Last year we had pneumatics, which our machines have. Many of the motors on the robots are even controlled with PID control algorithms, just like the equipment we make. A number of the students have learned embedded C, and all of our code is student written and maintained. All of our parts are designed first in CAD, prints are made and handed to other students to fabricate. Tolerances are discussed, changes are propagated back to the models, and the robot is assembled in a fairly controlled manner. If you didn't read the first part, then you may even think I am talking about a real engineering company.

The students in this program will graduate college and move on to deal with some of the problems facing the world today. These students will design wind turbine, more efficient cars, new space capsules, and all kinds of things I can't even think of.

That is the reason I support FIRST.

NASA kindly hosts the competition live as a webcast. Check this link on any Friday or Saturday in the next month or so to see live robot action.

You should also find and visit your local regional this year.


died in a blogging accident

or, what browsers do xkcd readers use?

93% of my blog traffic comes from search engines. 89% of my search engine traffic comes from variations on "died in a knitting accident". It is safe to say that 100% of people who search for that either read xkcd, or are knitters who had someone force xkcd on them. I happen to have the browser data of the subset of people who read xkcd and needed to search to see what came up.

Without further ado, the results:
1. 47.92%
2. 23.96%
3. 9.27%
4. 8.63%
5. 6.39%
6. 1.92%
7. 0.96%
8. 0.32%
9. 0.32%
10. 0.32%

I am thrilled that some nut visited using SunOS. Keep it up.
If you look at browser only:
1. 66.45%
2. 23.96%
3. 6.39%
4. 1.92%
5. 1.28%

Compare with my wife's knitting blog:
1. 58.46%
2. 36.92%
3. 3.85%
4. 0.77%

I'd also like to hear from the visitor who has a 3840 x 1200 desktop, though it may actually be my coworker with three screens at work.
1. 29.07%
2. 21.41%
3. 14.38%
4. 8.63%
5. 8.31%
6. 4.79%
7. 3.51%
8. 3.19%
9. 1.60%
10. 1.28%
11. 0.96%
12. 0.64%
13. 0.64%
14. 0.64%
15. 0.32%
16. 0.32%
17. 0.32%

Some people may need to be notified that computers do 32 bit color now....
1. 79.87%
2. 15.02%
3. 5.11%

Conclusion: Google knows too much about you.

Corollary: I spend too much time looking at hit graphs



My original engineering dream was to make robotic prosthetics. I still want to do this someday. Recently, Dean Kamen announced an Awesome robotic arm, called Luke.

Watch the video!


The microscale may be dead. I think the bearing is sticking (for the second time). There can only be one solution to a mechanical problem... software! I tried to work around it in some interesting ways.
  • Adjust the indicator flag to be more like the original article
  • Adjust the flag most of the way to normal
  • Attempt to calculate the mass as a function of both the current force and the current error
  • Adjust the gain so that it moves faster
  • Adjust the gain so it moves more slowly
  • Adjust the gain so it moves WAY more slowly
  • Put the gain back where it was
  • Add 2 to the gain instead of 1
  • Undo
  • Stop averaging the last two error readings
  • Undo
  • On Even seconds, reduce the force by 5mg to break the friction
  • 10mg?
  • 15mg?
  • Undo back to 10mg
  • When seconds MOD 4 == 0, reduce the force, ==1 and ==2 go back to the regular force, ==3 actually try to balance
  • Same, but with MOD 5
  • Same, but break the 5 second cycle into 1,2,2 instead of 1,3,1 (Fake, recover, balance)
  • reduce the force by 20mg
So, after all that (half of which is in the SVN), It is repeatable to within +/- 0.3 mg (when it stabilizes), or it will flail around wildly +/- 70mg. The only difference between the two states is when you put the sample on the scale.

Possible "improvements"/Next Steps(that don't involve the 2kW heaters from the last UW project, just to see if they still can melt aluminum in 10 minutes)
  • replace the galvanometer
  • add springs to support the flag (stabilize)
  • make the moving parts lighter (reduces accuracy - HA!)
  • Realize that Erica can manually take the data faster than I can fix the scale
  • Offer to set up webcam and OCR the regular scale into data
  • Offer to write AHK script that will show pictures from the Nikon of the regular scale, so data entry is faster

(for those keeping track, Finished_Projects is now back to nil,m not counting FIRST)



I've been working for a little while with a couple other folks on a reprap. One thing we didn't like about the basic (Darwin) reprap is the large number of parts needed to make it (example). We started coming up with some ideas, and I was able to design a simple 3-axis gantry system that uses 11 copies of a simple printed block, and that's it. all other parts are non-printable, but simple, like threaded rod and bar stock. In theory, the reprap will have interchangeable heads, allowing extrusion, cutting, and maybe even laser cutting. I even want to make a low pressure waterjet, though the added complexity is not fun.

Current status:
  • I think one of the Johns is ordering parts.
  • The design needs to be adjusted to use less plastic per block.
  • Need to get the uBrain or some other motor controller working.
  • Someone needs to look at software to control this thing, but I guess building it comes first.

Idea: Someone needs to interface a reprap to BugLabs.net hardware.


We shipped your package 10 days ago...

DHL needs to unclutter their email server. I ordered some ipod parts from rapidrepair.com, and have already received and installed them. I was somewhat surprised last week when Erica IM'd me to tell me a package had arrived. I was surprised, since I hadn't received a shipment notification... Until now

---------- Forwarded message ----------
From: <DHL-Notify@dhl.com>
Date: Jan 28, 2008 4:20 PM
Subject: DHL Shipment Notification - Waybill #[redacted]
To: engunneer@gmail.com


The following 1 piece(s) have been sent by Repair Dept. of Rapid Repair via DHL Express on January 18, 2008 using Waybill [redacted].

If you wish to track this (these) shipment(s) please contact your local DHL customer service office or visit the DHL Web Site at http://www.dhl-usa.com/

If you have a Web-enabled mail reader, click or copy the link in the web browser below to view shipment tracking details:
Sent To: Seattle, WA
United States Of America

From: Rapid Repair
Repair Dept.
1825 W. Main St.
United States Of America

Shipment Date: January 18, 2008
Delivery Date*: January 24, 2008
Weight: 1.0 LBS
Pieces: 1
Service: Ground
Note: Delivery times may vary, please visit www.dhl-usa.com for details.
Reference: [redacted]
* Based on Shipment Date provided by sender

Thank you for requesting DHL Express
for your delivery needs.

Good job letting me know, DHL. At least the package arrived quickly in perfect shape.


Died in a knititng accident part 2

Wow, apparently blogging about this particular xkcd comic is good for your google PageRank. I found another "blog" ( http://utenti.lycos.it/itosunit/2811/died-in-a-knitting-accident-xkcd.html ) that is even backdating posts about dying in various types of accidents. I wonder if these blogs just use jwz's DadaDodo nonsense generator to come up with this stuff. It comes up with things that almost make sense.

Other topics:
When will I learn that "a few more volts" can actually hurt something... For example, running a 12V scanner on 12VAC (a few years ago), or running a 12V scanner on 16V. Both appear to be bad ideas...


Died in a Knitting Accident

xkcd is one of my favorite online comics. Today's comic is highly amusing, but alas, no longer valid. Amusingly, "Died in a knitting accident" seems to be the most checked, as well as the most bogged about. Slightly more amusingly, there is actually a spam-blog posting about dying in a knitting accident. ( http://ktvbcom.blogspot.com/2008/01/died-in-knitting-accident.html ). It even posted yesterday.

I hope the knitting community catches on.



We've been doing some cleanup at work, and our IT department was throwing out some old laptops (and I mean OLD). I managed to get my hands on a tiny little laptop called the Toshiba Libretto 100CT. I have always had a place in my heart for (old) palmtops. I've always wanted one. This is by far the best find I have had digging in old Tech. Even better than the Tandy 102 I never should have sold.

The laptop itself doesn't have many ports. The entire front panel is battery, the left side is blank (HDD and battery). The back has mini headphone and mic jacks (3/32"). The right side showed the most promise, having two cardslots and an IR port. That's it. No floppy, no serial, nothing. USB hadn't even been inventged yet. A bit of research online shows two different docking stations (connection on bottom), and an external floppy that uses a PCMCIA (People Can't Memorize Computer Industry Acronyms) card slot. They didn't have any accessories for it, so I took it as is.

Anyway, the laptop was worth $2500 when it came out in the late 90s. It's worth about $100 today. The charging plug was similar enough to one I made years ago for an old Gateway Solo P120, and I was able to adapt it to the libretto easily enough. I charged it overnight and then brought it to work. Lo and behold, it booted! on battery! It came up in Window 95 (ick!), and I found out that it belonged to the CEO (2 CEOs ago). He apparently bought it back in the $2500 days. I also found out that the battery was still good for 6-8 hours of minimal use uptime! Not bad for a 9-year old OEM battery. Part of the deal was that I agreed to kill the old hard drive in it.

I grabbed some other old hard drives I had, stuck them in various laptops that had CD drives, installed various OSes on them, and then tried them in the Libretto. WinXP was a joke. Win2K booted into a BSOD, and Linux looked like a nightmare based on what I'd read.

I bought a floppy drive (same model) on Ebay, so at least I had SOME way to talk to it.

Time passed...

I asked IT if they found any of the other bits to the mini laptop. They showed me into the closet where they had squirelled away a few other bits of ancient hardware for me. They found the floppy drive, and a docking station that said Toshiba, but was the wrong kind (looked like a 2001/2002 model). Now I have two floppy drives, but they think they through out the docking station, based on my description of it.

More time passes...

Last week, I decided to give it another go (with FIRST season fast approaching), borrowed my USB floppy drive from work, and started hacking. I managed to hook a new 4.1GB hard drive to my P4 2.8GHz laptop, booted to a 98 floppy, and had to remember how to use fdisk. I managed to get the drive ready, and copy over my old Win98 CD to the drive.

Yesterday morning, I booted to the hard drive in the libretto, ran windows setup, and had win98 booting by 8AM. A few hours later, I had the video driver fixed, the floppy going, a network card,n a serial port, firefox, autohotkey, and a few other programs all going.

Last night consisted of some fruitless attempts at 802.11 (I had suspected the card was bad before I started), so tonight I blog via a wire, but it's all written on the Libretto!

Firefox is slow, so I have to type in notepad for now. Pandora won't run (maybe it will with IE6 or IE5.5), and I can't play youtube videos (skipping). At least I should be able to program AVR and Stamps from it. That (in theory) is the reason I fixed it, so we'll see how it goes.