Sunday, January 25, 2015

Bike tail final form?

I brought my bike inside today to do some more tweaks. 

I put my favorite headlight back on, a "1600 lumen" spot with a wide lens mod from Action LED Lights. It's mounted on a 3D printed mount grabbed off Thingiverse (link) since the powdercoated handlebar on this bike is very slippery to O-ring mounts.

I took the ailing Planet Bike computer off (I'm not upset, it's 10+ years old, it's just had too many shakes and is cranky these days) and put on a $3 Chinese eBay computer which actually works just fine.  I threw on a flashlight mount on the handlebar since I carry an 18650 flashlight in my tool pouch as a backup light, so I can just snap it on as needed.

I also made a new bracket for my new taillight, a DesignShine DS-500 (silver L bracket between the bar clamp an the taillight on the left on the first photo). The bracket it comes with is designed for mount on a vertical bar (seat post). I think on a horizontal bar with this bracket, it is far better - it is not leveraged way out from the clamp. Designshine actually sells this exact bracket and I would have ordered it but I didn't know about it then, and I figured I'd spend an hour making one rather than paying shipping and waiting a few days, since I had all the stuff sitting around to make it and it's fun to make your own stuff anyway.

I did a little tweaking to the bar mounts, so they're a bit more snug now. It's nice to have the bike inside, otherwise I would not do all this tinkering.

I also found a reflector that I like better than the one I was using, and swapped the positions of the camera and the light so that the light has more side visibility to the left.  Though now I'm thinking that side visibility to the right might be more important since that's the direction side traffic will come from.  I'm not sure which I'd prefer.

In any case, other than perhaps swapping camera and taillight, this is probably about as close to perfect as I can make it.

Monday, January 19, 2015

Bicycle tail accessory mount

I've had a lot of trouble getting acceptable rear mounts for my taillights and rear camera on my bicycle, since I ride with either a rack trunk bag or a garment bag, both of which obscure things mounted on the seat post.

Over the weekend I decided to brainstorm, I brought the bike into the lab and came up with this. I think it's a winner.

Here are the source files and a writeup on YouMagine if you like it.  Or send me an email if you want one and don't have a 3D printer.

Sunday, January 11, 2015

Raspberry Pi file/media server

I've had a Raspberry Pi single board computer sitting around for a year and hadn't figured out anything I wanted to do with it. If you're not familiar with it, the Raspberry Pi is a small, maybe a bit bigger than a credit card sized computer.  It costs about $35 and is actually a fairly capable little machine; it can run Linux, has ethernet, USB and HDMI outputs.

I decided to set it up as a file server. I like having a Linux box that is always on to run scripts regularly to do things like download and archive my podcasts. I figured that with an external green drive that spins down when not used, it would draw less than 10 watts on average.

I got things working well enough, then printed a case for it. It's living on the workbench in my lab, powered off a powered USB hub (so the adapter is always on anyway, not adding another bit of phantom draw there).  Here's what it looks like in the case I printed (available on Thingiverse)

Here's what I did, as best as I can recall it right now (if I do it again, I'll have to take notes):

Install to a 32GB SD card using the net install image, there are plenty of instructions online for this. It takes a while, and you really need a monitor and keyboard plugged in to do it.

Edit /etc/samba/smb.conf (the editor "nano" comes installed, or install and use your favorite).  I inserted these sections.  This creates a private "usb" share and a public share (named "public")
        path = /media/usb
        comment = usb drive
        read only = no
        browseable = yes
        guest ok = no
        create mask = 0777
        valid users = pi
        path = /media/usb/public
        comment = public share
        read only = no
        browsable = yes
        guest ok = yes
        create mask = 0777

Mount the usb drive; plug it in, then:
mkdir /media/usb
> sudo mount -t auto /dev/sda1 /media/usb
Add a line to /etc/fstab so it always mounts:
/dev/sda1       /media/usb      auto    noatime         0       0
Restart samba:
> sudo /etc/init.d/samba restart
The shares should be active now.

I used Firenze as my podcast downloader. However, as far as I can tell, the only way to set it up is via a GUI and I am running this machine headless. I took my config file from a Windows install that I'd been running previously, altered the download location, and that worked OK.  It would be nice if there were a command line version of the config though.

Setting up MiniDLNA so that you can view media from a device such as a blu-ray player or smart TV:
(I used the guide at
> sudo apt-get update > sudo apt-get upgrade  > sudo apt-get install minidlna
Start MiniDLNA, it will create a default config file:
> sudo service minidlna start
now edit /etc/minidlna.conf.  I added:
This sets up a video directory in the location indicated, calls the server "runt" (you can make up whatever name you like of course), and tells it to watch for new files showing up in the location.  Restart minidlna (force-reload instead of the normal "restart" because otherwise it won't look for new files that are in the new location.  This makes it rebuild its database)
/etc/init.d/minidlna force-reload
Make sure it restarts on reboot:
update-rc.d minidlna defaults
That's it, you should be able to watch movies that you stick in the video directory now.

New printer: JGAurora A3

This week I decided I'd had it with all the other printers in my stable.  The CTC is stable and decent but it just bugs me (can't st...