Thursday, January 20, 2011

Vintage Headlight Upgrade

IMG_0949
The light after grafting in the Boomer.

I found this retro-looking headlight at the SPCA thrift store a long time ago, and put it into my parts bin, figuring that sooner or later I'd get around to improving it. Recently one of my Knog Boomer headlights was acting up; refusing to turn off, on, change modes, stay on the correct mode...it was very clearly broken.

The Boomer claims to have a one Watt LED, and in practice the light is pretty bright. You certainly don't want to look into it, but it isn't quite enough to use as a primary source of illumination on country roads. It is best used as a light to make you visible to cars and other cyclists, in conjunction with street lighting or a high powered headlight.

I decided to graft the Boomer into the retro headlight because it is cheap, runs off common batteries, and the stock wide angle reflector in the headlight works well if your goal is visibility. The Boomer is small enough even with batteries that I can fit everything inside the body of the headlight keeping a nice clean look.

The fist step was figuring out why the Boomer was acting up. The light is constructed with two PCBs which are connected by a short segment of flexible flat cable. One PCB carries the LED and battery contacts, the other contains the control circuit and on/mode/off switch. Both are contained in a hard plastic shell that is bonded together at the factory, holding the front PBC in place between two layers in the case, and preventing easy access to the screw that holds the top PCB to the inside of the case.

Both PCBs
PCBs and flat cable out of the case.

I resorted to cutting around the seams with a coarse hacksaw, which generated a fair amount of sharp tiny plastic chunks. The plastic is pretty hard, and a nice fine tooth saw or a Dremel with a cut-off disk would be the best way to go.

Once the PCBs were removed from the case it was easy to see the fault. The ground pad for the flat cable had lifted off the LED PCB and was intermittently causing an open circuit, resetting the light to its first flash pattern. Since the last pattern turns off the light, my chances of being able to turn the thing off was practically nil. (For those of you playing along at home, the pads are +3v, drain for the tiny red LED, power to the large LED, and ground, starting from the pad labeled A.)

Knog Boomer LED PCB
The lifted pad is the lowest on the flat cable.

Normally a lifted pad would be an annoyance to fix, but in this case each pad is connected with a via to a pad on the backside of the board. So really all I have to do is tin the pads, and solder the flat cable or wires to the back of the board. I soldered everything up with some very thin stranded wire to make sure there were no other faults, then set it aside to work on mounting everything into the light.

In most cases I'd just use the battery holder out of whatever I was hacking apart, but this holder is integrated into the case that I destroyed to get the the PCBs. So that's out. My pile of junk yielded a AAA battery holder from an Xmods RC car which has the nice advantage of a clip over the batteries to keep them from working loose under vibration. The disadvantage is that if it was permanently mounted in the light, getting the clip off would require a small flat-head screwdriver or really tiny fingers and tons of dexterity. Since it is pretty poor design to require your users to have either of those to change the batteries, I needed a solution to mount the battery holder securely that would still let me get it in and out of the light easily.

Battery Holder on Platform
Xmods battery holder clipped onto plastic tray.

For this I made a tray out of Shapeways plastic that would hold onto the battery holder with an arm at either end. To constrain the horizontal movement of the holder the tray was formed to the bottom of holder which has several cutouts and other features that effectively lock the two together horizontally but allow the holder to be easily lifted off.

Battery Platform
The plastic tray, note the various raised features on the surface of the tray.

The Shapways plastic has a very low softening point, on the order of 90 C, which makes it very useful when quickly prototyping or producing low-strength parts. In this case I made the tray first by rolling out a sheet of the plastic, cutting a rectangle and forming it to the bottom of the battery holder while the plastic was still warm. From there it was easy to cut arms out of the same sheet, fuse them to the tray and form them over the holder which resulted in a very good fit while still being easy to insert and remove the battery holder. This entirely eliminated the need to measure up the battery holder and accurately fabricate a tray to those measurements, saving a great deal of time and effort.

The tray is mounted on disks of hot glue adhered to the inside of the light. They were first heated slightly and attached to the corners of the tray. The entire assembly was then placed into its final position inside the light and a candle used to heat the exterior of the light, melting the portion of the hot glue in contact with the wall of the light first. There was some slight distortion of the tray corners due to the hot glue conducting heat really well, but not enough to impact the fit of the battery holder.

IMG_0926
Battery tray and holder mounted in the light.


The tray and battery holder are mounted off center to make it slightly easier to get the battery holder in and out. Ultimately this wasn't a huge improvement, but the battery location doesn't have a negative impact so I left it as it was.

Once the tray was mounted I had a good idea of the amount of space available for the LED and the circuit boards. There was enough room to stack the switch PCB on the back of the LED PCB and attach both directly to the reflector. This simplified the wiring between the PCBs and places the switch in a convenient place. I chose not to mount the switch on the exterior of the light as there were not any readily available waterproof switches that complimented to look of the light. A future addition would be to add a reed switch or Hall effect sensor so that the light can be toggled without opening the light.

Better than a ribbon cable
Wiring between the two PCBs. (It is well past time for a new tip on my soldering iron. Hence the shrinkage on the insulation and the generally shoddy soldering job.)

Stacked PCBs also have the advantage of keeping the wire runs between them very short, reducing the potential for fatigue. Once the wires were cut and soldered up the PCBs were hot glued together, sandwiching the wires between them. This should prevent any of these pads from working loose. On the LED board heavy solid core leads were added as spacers to protect the LED and provide a connection point for the wires running to the battery holder. Placing them between the PCB and the bulb holder acts as a stress relief, which is important considering the long run to the battery holder.

Assembled
The stacked PCBs mounted on the reflector, and wired to the battery holder.

Overall I'm pretty happy with how this light turned out. It has a really wide even beam, meaning that traffic from the sides will see me sooner and that I won't cause an oncoming motorist to have a seizure and hit me. The town bike that this light is destined for is out on loan to a friend right now, once it comes back I'll attach it and see how it holds up during operation. I'm confident that it will work fine, or at the very least last longer than the Knog did.

Saturday, January 1, 2011

Quick Xbox controler hack

Recently I found an old Xbox controller in my projects bin. Not having an Xbox, I decided to do something that was last popular five years ago: make it work with USB.

Xbox meets USB
Tinned and ready to go. Xbox controler cable on the left, USB + heat shrink tubing on the right.

For those of you playing at home, the Xbox controller is already a USB device. All you have to do is lop the existing end of the cable off, put the end of a standard USB cord onto it, and you're done! The wires inside of my cord and controller were even color coded correctly, so all I had to do was match colors. There will be one extra wire coming from the controller, ignore it.

Spliced
Soldered and shrink-tubed, if you were particular about things you could replace the shielding, but I didn't feel the need to.

I installed the XBCD drivers, plugged the controller in and all the functions were recognized. Since then I've been using it to control Orbiter, for which the controller works fine, but my reentry skills seem to leave a lot to be desired. So far all my attempts have been more meteor than space shuttle.