Wednesday, August 1, 2012

Attaching an umbrella to a bakfiets

Update: This worked great until my wife took a ride on a really windy day and the umbrella blew inside out with a strong cross-wind. Still working on an alternative.

I bought a rain cover for my bakfiets when I ordered it, and it's great in the winter because it keeps all the wind out so my son stays warm. But in the summer, it's like a greenhouse and just cooks in there. Unfortunately, I have to use it a lot in the summer because there's a good chance of thunderstorms everyday in Colorado.

My first thought was to add zippers on both sides of the canopy like a tent and just leave the sides rolled down unless it's raining (see picture below with cude red line where the zipper would go). I went to a local gear sewing/modification shop and they quoted me $100 per zipper, so I scrapped that idea.

I also thought of building a frame and somehow attaching a cover over just the top, but then I remembered a cool umbrella video I saw awhile ago. So I ordered a Senz smart stick umbrella off amazon and figured I could find a way to attach it once it showed up. After brainstorming in my garage for a bit, I came up with a pretty simple PVC piping holder that uses the bobike mini for attachment. Here's the end result:

For parts, I found that 1 1/4" PVC tubing fits the umbrella handle well, so that's what I went with.
  • 1 1/4" PVC tubing
  • 1" PVC tubing (to fit inside the 1 1/4" tubing)
  • 1 1/4"  tee (Home Depot was out of tees, so I got a cross and hacksawed off one port)
  • two 1 1/4" 90 degree angles
  • 1/4-20 all thread
  • 1/4" nuts
  • umbrella
  • set screw, thumb screw, or wing nut screw
  • hacksaw, wrenches, measuring tape, marker, PVC glue, drill, drill bit


I assembled the PVC parts in this shape, selecting the lengths to set the right angle and get a tight fit in the bucket. The separate length of 1" PVC goes inside the main vertical tube.

 Here the PVC is sitting in the bucket, ready for the umbrella. The main tube is held upright by the allthread inserted in holes in the bobike mini leg bars. This won't work if you have the foot rests all the way up, so in that case you might have to use cable or zip ties.

It works pretty well without gluing the PVC, so I could have left it just press fit together, but I ended up gluing all the joints since I had the PVC glue lying around. You can't see it in any pictures, but I dropped a length of the 1" PVC pipe down the main umbrella holder tube to act as a spacer and set the height of the umbrella.

Here it is with the umbrella inserted. I added a 1/4-20 wing nut screw that presses into the umbrella handle to keep the umbrella pointing forward since unlike most umbrellas, senz umbrellas have a front and back.


During the week when I'm riding to and from daycare in the morning and evening, I just leave the umbrella out of the tube and lying in the bucket as my backup rain cover. On the weekends I tend to use it as a sun shade because we usually end up riding in the middle of the day.

It's easiest to remove the umbrella to get my son in and out. Since I'm always using the wing nut screw, I'll probably eventually replace it with a large thumb screw that's easier to turn. And probably choosing a thread that is more coarse than 1/4-20 would be better. I'm also going to be on the lookout for good padding to add over the PVC tube.


Sunday, May 20, 2012

trendnet TV-IP422W: how to take time lapse videos using a NAS

I wanted to setup my trendnet TV-IP422W to record images or video snippets at a regular interval to my network attached storage (NAS) so I could then convert them into a time lapse video. I just figured it out, but the setup wasn't obvious to me, so I thought I'd post what works in case it's helpful to anyone else. From the setup page, go to Event Server, then Network Storage. It should look like this:


  • Samba Server Address: enter IP address or name, nothing extra
    • xxx.xxx.xxx.xxx or nasname
    • if you use the name, do not enter slashes like this \\nasname
  • Share: top directory, no slashes
    • something like Volume_1
  • Path: 
    • something like /ipcamfolder/ or just ipcamfolder
  • When you click on the Test button, it should write a text file to the folder and popup a message saying it was successful.

Now go to Event Config and Schedule Profile and add a new profile for the days and times you want to record pictures.

Go to Event Config and General to set how long to record for each time - I left it at 1 second, the minimum.


Go to Event Config and Schedule Trigger to enable recording, select the schedule, and pick the recording interval.

Now I have a ton of 1 second .avi video files that I need to combine to make 1 time lapse video. I'm using windows 7, so the simplest thing for me to use is Windows Live Movie Maker (WLMM).

WLMM can only load so many videos at a time, which got annoying, so I ended up using Lifehacker's AVI-joiner to combine all the avi files. Then I open the long avi file and speed it up with WLMM.


Sunday, May 13, 2012

python v3 answers to MIT python course

I went through the MIT (gentle intro to programming) python course with my cousin. We decided to use python 3 to get some extra practice since the course material is all python 2. A few times, I found myself wishing I had the answers to check my work, or when I felt I was doing something wrong. Also, it was occasionally hard to get the code provided to work with v3.

So I decided to post my answers just in case it's useful to anyone else. Obviously I'm no expert since I'm going through an intro class, so keep that in mind if there's something wrong or if I did something in a weird way.

Individual zip files for each homework set:
  • HW1 - cipher.py, conditional_examples.py, height_example.py, hw1.py, input_example.py, loop_examples.py, loops.py, rps.py
  • HW2 - hw2.py, nims.py, opt2.py, pig_latin.py, string_and_lists.py
  • Project 1 - hangman.py, hangman_lib.py, hangman_lib_demo.py
  • HW3 - hw3.py, queue.py, stack.py
  • HW4, (v3 graphics.py is here) - ana_clock.py, car.py, dig_clock.py, tetrominoes.py, wheel.py
  • Project 2 - game_of_life.py, game_of_life_template.py
  • Final Project - tetris_template.py, tetris.py

One zip file for all homework:

Thursday, May 10, 2012

attaching a bobike mini to a bakfiets

My kid outgrew the infant car seat, but wasn't quite ready to sit on his own on the bakfiets bench, so a bobike mini can be used to help transition to the bench.
The folks at MyDutchBike sold me the bobike, gave me some info, and pointed me towards this helpful flickr page for ideas. In order to make room for two bobikes or to use the bakfiets seatbelts, one side of the bobike needs to be shaved off, along with the metal leg posts. Since I only have one kid for now, and I was pretty sure I couldn't cut the edge off without making it all ragged, I decided on a different method. After staring at it for quite awhile, I decided I could use a 1" wide rachet tie-down strap to attach the bobike to the bakfiets seat.
I tested it out and it worked great, but the problem was that the only point of attachment is the two little seat pivots, which don't look like they would hold much. So I decided to drill two additional holes and move one of the seatbelts to the center.

Here is the left seatbelt removed with two holes drilled in the center.

Left seatbelt migrated to the center.

The slightly tricky part is using the ratchet tie down to attach the bobike to the bench. The tie down passes through two slits at the back of the bobike, and around the metal bars in the front. The bobike comes with it's own seatbelt, but I cut it off, leaving just the rigid crotch strap.

This is the rachet attachment underneath the seat. The seat is short, so I had to hook the ratchet to itself in the shortest possible configuration.

 And here's the finished product. The bobike is still only attached to the bench. But with a kid buckled in, the seatbelt adds an attachment to the bucket. 

Since I already have two eyebolts installed for the infant seat, just to be extra anal about safety, I added two quickdraws, so even if the bench totally fails, the bobike isn't going anywhere.

We did a little dry run in front of the house and Silas seems to love being able to see where we're going. 

Monday, April 2, 2012

attaching infant carseat to bakfiets

I just got my bakfiets from MyDutchBike and the first order of business was to install hooks for an infant car seat. Inspired by these pictures of a solution, I headed off to the hardware store. 

Here are the parts I ended up using - eye bolts, larger washers, and locking nuts.

The right side was easy and just bolted in place. Here's a picture of the bottom:

I had hoped to come up with a method that didn't involve drilling any holes in the bucket, but the kickstand magnet was in the way on the left, so I ended up drilling one hole for the left side.



All finished with both eye bolts attached.

 And the car seat hooked in.


 I added some old towels to cushion the ride a little.

I biked Silas to daycare today and he loved it! 

(Here is how we used a bobike mini to transition to the bench once he outgrew the infant carseat)

Friday, January 27, 2012

start and stop crashplan on a schedule

I love crashplan, but lately my computer is seeming really slow and maybe it's just me, but crashplan seems to be using more memory than I remember. I tried changing the settings to have it only backup at night, but that didn't lower the memory usage. So, instead, I decided to turn it off most of the time, and only turn on when I want it to backup a few nights a week.

It turned out to be fairly easy since the crashplan website has instructions on how to start and stop the service from the command line.

The start batch file is:
net start CrashPlanService
start "" "C:\Program Files\CrashPlan\CrashPlanTray.exe"
The stop batch file is:
net stop CrashPlanService
I already followed the instructions here to automatically mount network drives, so I put the batch files in the same folder. Then I made two tasks in task scheduler, one to start at night and one to stop in the morning. I saw some people online had problems getting task scheduler to work with batch files, so I made sure the folder and batch files had administrators and system set to full control. I tested it and it seems to work great!

Oh, and to save energy, I'm using the software smartpower to automatically hibernate and wake up my computer. I set it to wake up 2 nights a week for the crashplan backup.

Saturday, January 21, 2012

checking latex related settings with IEEE testflow

I'm trying to submit an abstract to an IEEE joural and I just learned about testflow. It's a pretty sweet idea, use a standard .tex file to generate a .pdf file on your machine, then compare the generated pdf to a standard pdf. On my machine, Win7 64bit, I found the files here:

  • standard pdf and instructions: C:\Program Files\MiKTeX 2.9\doc\latex\testflow
  • test .tex file: C:\Program Files\MiKTeX 2.9\tex\latex\testflow
The instructions are really good. My generated pdf looked great, except that the margins on the right and bottom were weird. The  testflow_doc.txt instructions said the problem was most likely that some program (pdftex, DVIPS, or ghostscript) was set to default A4 instead of letter paper. In the end, I couldn't figure out why the margins are off, but below are all the steps I followed, even though it didn't seem to change anything.

DVIPS
I followed the changes for the dvips config file, which I found here:

  • C:\Program Files\MiKTeX 2.9\dvips\config\config.ps
Ghostscript
I found the files here:

  • C:\Program Files (x86)\gs\gs9.02\lib\
    • ps2pdf.bat
      • my compatibility level was 1.4, so I didn't change it
    • ps2pdfxx.bat
      • I replaced the 2nd line with:
      • echo -q -dSAFER -dNOPAUSE -dBATCH -sPAPERSIZE=letter -dPDFSETTINGS=/printer -dMaxSubsetPct=100 -dSubsetFonts=true -dEmbedAllFonts=true -sDEVICE#pdfwrite >"%TEMP%\_.at"2
pdftex
I found the file here
  • C:\Program Files\MiKTeX 2.9\pdftex\config\pdftex.cfg
  • the file says to run initexmf --edit-config-file pdftex, so I made the suggested changes to both files.
xdvi
I couldn't find the config file.