Monday, May 18, 2015

Add a Front Center Pull Brake to Vintage Bicycle

I have a vintage "Derby" brand single speed coaster brake bicycle with metal fenders.  It was probably made in the 60s or 70s and sold by Pep Boys. The design is similar to the classic Schwinn Speedsters of the same era.

I really like the bike but have a hard time trusting the chain during downhill braking, so I wanted to add a front brake.

Hopefully this will help people who are wanting to add a front brake to their vintage bicycles.

First make sure there is a mounting hole for the brake on the fork. You can tell this model was designed for a brake by the hole and also the indentation in the fender.
Get the parts you will need from a used parts shop, I got all the items from the Recycled Cycles Fremont location in Seattle for about $20.

Center Pull Brake [bolt, 2 spacers, pads]

Make sure the brake fits over your fenders and that the pads touch the metal part of the rim when closed.  I happened to find a "Center Pull" style brake that fit.  If you find a side pull style you won't need the Cable Carrier or Cable Hanger, just a longer Cable Housing.

Cable Carrier

Cable Hanger

Brake Lever - Make sure this will fit on your handlebar, I'm not sure if there are different sizes.
 Brake Cable
 Brake Cable Housing and Ferrules - I used 1.5 feet for this project.

To install the cable hanger you have to remove the handlebars. (only necessary for center pull style brake)

Unscrew the top bolt between the handlebars a few turns and give it a firm downward tap to remove the handlebar stem.

 Remove the top Lock Nut.

 Insert the Cable Hanger then reverse the process to reattach the handlebars.

Attach the Brake
I think I lucked out with these two spacers because they fit perfectly under the small chromed flange on the front and back. 

 Push the brake through the hole.
 Attach and tighten the bolt.
Remove the handlebar grip by twisting and pulling, attach the brake lever and tighten in desired position.
 Insert cable into ferrule and cable housing then install in brake lever.
Route cable housing and cable around handlebars and through the cable hanger.
Push cable through the bolt in the cable carrier and tighten. 
 I found that the best way to tighten the cable carrier bolt was to pull the cable out towards the front while holding the brakes closed then tighten.

Give a some good squeezes on the brake lever and do some test braking to stretch the cable out. Afterwards adjust the cable carrier bolt to take up the slack. 
Et voilĂ , celebrate with a beverage!

Bonus images found around the web showing the most info I was able to find on this model.

Monday, July 21, 2014

Bear with Ragged Staff Brass Corkscrew

Warrikshire (Warwickshire)
Birthplace of William Shakespeare

Bear with Ragged Staff

Brass Figural Finger Pull Corkscrew
Chained bear scratching tree stump

Friday, April 11, 2014

Installing Arduino & Teensyduino on Ubuntu 14.04 (Trusty Tahr)

I have a Teensy 3.1 and a laptop running Ubuntu 14.04.

The Teensy website recommends using the Arduino software from instead of the repository (apt-get) presumably because the repository is out of date.

First I downloaded the Linux 32-bit version of Arduino 1.0.5 and extracted the folder to my Desktop.

I tried to run the "arduino" script in the folder but it failed with a java not found error.

drwxr-xr-x  8 --  4096 May 17  2013 .
drwxr-xr-x  3 --  4096 Apr 11 18:25 ..
-rwxr-xr-x  1 --   444 May 17  2013 arduino
drwxr-xr-x 13 --  4096 May 17  2013 examples
drwxr-xr-x  4 --  4096 May 17  2013 hardware
drwxr-xr-x  3 --  4096 May 17  2013 lib
drwxr-xr-x 18 --  4096 May 17  2013 libraries
drwxr-xr-x  3 -- 20480 May 17  2013 reference
-rw-r--r--  1 -- 37903 May 17  2013 revisions.txt
drwxr-xr-x  3 --  4096 May 17  2013 tools

*@*-Latitude-D810:~/Desktop/arduino-1.0.5$ ./arduino

./arduino: 22: ./arduino: java: not found

Ok, fair enough. Ubuntu must not have any java libs installed by default.

I found this nice stackoverflow question that deals with the dependencies required by the arduino IDE.

openjdk-6-jre is java
avr-libc and gcc-avr are c++ compiler libraries for working with atmel processors

Install all three by opening a terminal window and typing:

sudo apt-get install openjdk-6-jre avr-libc gcc-avr

168 megabytes of downloading and installing later you should be able to run the Arduino IDE using the terminal and typing "./arduino" in the folder you extracted to the desktop.

Wouldn't it be nice if you could double click the "arduino" icon (shell script) in the folder and have it run the IDE without using the command line every time?

Open a file explorer window and choose Edit>Preferences

From the "Behavior" tab select either "Run executable text files when they are opened" or "Ask each time"

Now you will be able to double click the "arduino" icon and have the script automatically execute.

Now we need to get the Arduino IDE working with the Teensy 3.1.

PJRC (maker of the teensy) has an explanation of how to install their add-on to the Arduino IDE called "Teensyduino" here.

I'm going to take you through the process step by step.

Download the Linux Installer (32 or 64-bit) from PJRC.

Once downloaded you have to change the file to be executable.
Right click on "teensyduino.32bit" (or 64bit) and choose "Properties"

 Check the "Allow executing file as program" box.

Now you should be able to double click on the "teensyduino.32bit" (or 64bit) icon and the installer will run.

Select the Arduino IDE folder and the "Next" button should activate.

Click "Next" then choose all the support libraries you want to install. I usually just install all of them.

Next we install the "udev-rules" from PJRC which let us send programs to the Teensy over the USB connection.

Save the "Linux udev rules" file to your computer from the PJRC website.

 Open the terminal again and go to where you downloaded the file and copy it to /etc/udev/rules.d/

*@*-Latitude-D810:~$ cd Downloads
*@*-Latitude-D810:~/Downloads$ ls
49-teensy.rules  arduino-1.0.5-linux32.tgz  teensyduino.32bit

*@*-Latitude-D810:~/Downloads$ sudo cp 49-teensy.rules /etc/udev/rules.d/

Now that the Teensy libraries are installed we need to start up the Arduino IDE and select the Teensy 3.1 as our development board.

Open the Arduino IDE and choose Tools>Board>Teensy 3.1

If all the above steps have been completed you should be able to plug in your Teensy 3.1 to a USB port and upload a sketch.

Saturday, September 14, 2013

HTML 5 Bezier Curves

I've created a display not unlike the classic windows os screensaver via HTML 5.
For more examples visit

Wednesday, January 9, 2013

Stumbling my way to "Hello World" on OUYA

This entire blog post is a work of art and not an actual guide.

Please refer to other, more knowledgeable sources if you are actually interested in developing apps on OUYA.

Here are some good places to start:

First off, the official OUYA Developer Portal:

The official ODK forum:

A nice set of youtube videos by metaPhx describing getting AndEngine and a Nexus 7 working:

Developing an OUYA app from absolute zero knowledge of programming for Android or OUYA!

Downloaded and extracted the following to C:\OUYA-dev\

Followed this tutorial about creating an android project from scratch:

Start Eclipse:

Install ADT Plugin

Realize the adt-bundle already came with eclipse :)
oh well.

Not sure what I've gotten myself into!
Click New
"Use the Android API Level 16 (Android 4.1 "Jelly Bean") when developing for the OUYA Console."

Created a new Android Virtual Device in eclipse... started with Galaxy Nexus because it has high resolution.

Started the emulator, waited for jellybean to boot. (had a memory allocation error so I reduced the virtual device RAM to 512MB)
Unlocked the emulated device and chose to run my app from eclipse...
(You can see I also dragged a checkbox into my app)

If I click the android app button in the emulator I can see my awesome creation sitting there!

Now I have to figure out how to incorporate the OUYA sdk files... this looks like some work.

In order to use the OUYA API you will need to include ouya-sdk.jar in your project libraries, as well as guava-r09.jar and commons-lang-2.6.jar. These can be found in the libs directory. 

Need to figure out how to include these jars in my project...

Since I don't know what I'm doing I just dragged the files over the "libs" folder on the left side of the eclipse interface and chose to copy the libraries into my project.

Okie doke... there they are

Yeah, so I'm not sure what to do so I'm just going to try to create the OUYA virtual device.

Opened the Android Virtual Device Manager and chose the Device Definitions tab, clicked "New Device" button:
If using the emulator, configure the Android virtual device as follows:
  • Resolution: 1920x1080 or 1280x720, as desired
  • Hardware Back/Home keys: yes (you will need to add this to the hardware parameters)
  • D-Pad support: yes (you will need to add this to the hardware parameters)
  • Target: Android 4.1 - API Level 16
  • CPU/ABI: Intel Atom x86
  • Device RAM size: 1024
Only 512 RAM because of the previous error I had.

Wow... I realize I've probably created the worst tutorial for anything, ever. Sorry.

Since I want to install some APKs via adb onto the emulator I had to add the android SDK directories to my PATH variable in Windows XP.


soooo...  now I should be able to easily install the ouya-launcher.apk via adb.

apparently the path variable isn't immediately updated :(
Oh well, still able to just use the full paths.

C:\OUYA-dev\adt-bundle-windows-x86\sdk\platform-tools>adb install C:\OUYA-dev\OUYA-ODK\ouya-launcher.apk

All right! Now what? There appears to be a timer and a stopwatch if you arrow left or right?

may as well install teh ouya-framework.apk
C:\OUYA-dev\adt-bundle-windows-x86\sdk\platform-tools>adb install C:\OUYA-dev\OUYA-ODK\ouya-framework.apk

OK, hit escape to get out of the stopwatch thing, not sure why it chose to run that. Found the OUYA launcher in the app list and launched that. success!

I feel like a damn wizard at this point, even though I know I've barely scratched the surface.
Down arrow to "skip pairing" and it's the Julie Uhrman video, plays like a slideshow on my computer.

 Now it's just stuck at the Contacting OUYA servers... screen :(

 Apparently if you wait about 5 minutes it times out, yay!

 Well, I don't have the buttons configured correctly so I'm stuck on this screen, time to restart the emulator
Update: actually I wasn't stuck, you can click on the little round buttons using the mouse.
Changed some settings to the AVD anyway

 Chose menu - devs - software... hmmm my app isn't there... oh yeah... because I haven't ran it from eclipse yet.
Chose the "run configurations" from eclipse and changed the target to "always prompt" so it wouldn't try loading the Nexus AVD that I created earlier.

My app came up, I was able to hit escape and get back to the OUYA frontend, reload the "devs - software" menu and now I see it!

Runs like I don't know what I'm doing, showing the android menu bar and I'm not sure why I have a black border on the right side of the emulator. HELLO WORLD!

all the entries