Thursday, September 29, 2011

An ode to the Raleigh Superbe and its Dynohub

On my walk to work today (I didn't ride as rain was expected and I had the child seat on my Orange
bike) I encountered no fewer than five  Raleigh Superbes.  A Superbe is a fairly common sight on the streets of Toronto, both the gentlemen's version as well as the lady's step through frame. I usually happen across one or two a week, but five in one day is exceptional.

Superbe from an eBay auction

Another beautiful example from this blog.

Another Superbe from mytenspeeds.
The Superbe came in a variety of colours since its inception, but it is the 'Bronze Green' model of the sixties and seventies that is by far the most common Superbe you see here in Canada.  One day, I hope to own one!  The Superbe undeniably has classic retro appeal, but what fascinates me most about this bike is its Dynohub lighting system.

Dynohub advert from SA heritage site.

The Sturmey Archer GH-6 Dynohub was the centerpiece of this system and it preceded the recent glut of contemporary hub dynamos by more than 60 years. Introduced in 1945, it was in production until 1984 according to this Sturmey Archer heritage site.   It is often mistakingly rated the same as contemporary hub dynamos ( 3W @ 6V) but it actually puts out around 1.8W @ 6V.  I've confirmed that my GH-6 saturates at about 330-330 mA, which is consistent with the later power rating.
The Sturmey Archer GH-6 Dynohub. My favorite hub in the whole world.
Photo from Sheldon Brown's Dynohub article.
In the world of LEDs this is still a very respectable amount of current, so the GH-6, despite its antique status, is quite capable of powering a modern lighting system (Update: after more testing I've determined that the Dynohub saturates at speeds above 35 km/h, so is, in fact, not very useful for powering LEDs without a magnet upgrade). They are reasonably easy to disassemble and service, provided the bearing races aren't shot and the armature coils are intact.  I pulled one apart that was in very rough shape but, despite a lot of internal corrosion, it seems like the armature windings are intact (at least by testing continuity with a multimeter, although I guess this could also mean they are prematurely shorted!).

Product photo from Sturmey Archer. Oddly, the front hub has been placed in a rear drop out.
I find the GH-6's lopsidedness appealing, although some might call it an odd looking duck with its one gigantic spoke flange on the dynamo side and a regular sized flange on the other.  I discovered that this unusual configuration can make getting a wheel built around the GH-6 take a little longer as the build calls for odd spoke lengths that most bike shops need to special order; I had the GH-6 from a Superbe rebuilt into a modern aluminum rim.  Before the build I stripped the hub apart, cleaned it and repacked the bearings. Despite its 42 years (at the time of servicing), it cleaned up beautifully and there was hardly any wear on the races.  I expect it will last a lifetime.

Tuesday, September 27, 2011

Choosing LEDs and batchPCB success!

My main aim is to design a dynamo powered LED lighting system that can be retrofitted into vintage bicycle housings.  My earliest approach was to use T10 Edison screw replacement LED bulbs.  These are LEDs with a driver circuit retrofitted into a standard 10 mm threaded incandescent bulb housing, which were very common in flashlights until the flange base bulb came into vogue.  Almost all of the vintage lamps I've come across use the Edison T10 thread.  In theory (and mostly in practice), this is an easy and reasonable way to upgrade vintage lamps to use modern LEDs.  All you need is a rectified DC output from the dynamo and the LED's driver circuit handles the rest. However, these LEDs aren't the brightest ones available and you are, for better or worse, at the mercy of the built-in optics of your lamp housing.

After experimenting with these LED flashlight bulbs for a while I decided I wanted to use my own LEDs and drivers.  When being driven by a dynamo LEDs don't really require a regulated current source, defeating the purpose of the driver circuit built into these bulbs. The dynamo itself acts mostly like a constant current source nicely limited to 500-600 mA (depending on the hub).  Many high power LEDs are available with maximum current limits above what the dynamo can generate. You're really spoiled for choice in this category, so picking one is really just a matter of price. I went for the premium XP-G series for my front light (490lm @ 1.5A), which is step below the XM-L series that can produce a whopping 943lm @ 3A.  I am debating between a Cree XP-E (98lm @ 0.7A) or an OSRAM Golden Dragon Plus (118lm @ 1A) in red for the taillight.
Cree XP-G. 490lm if you can get 1.5A into it (and get rid of the heat!)
Keep in mind that, without some extra driver circuitry, you can't drive these LEDs at their maximum current rating with the hub dynamo, nor would you want to; getting out the heat they produce at high currents requires careful thermal management design.  So, by picking LEDs with maximum current ratings considerably higher than what the dynamo can generate there should be a fairly wide safety margin for overcurrent and overheating conditions.

Cree XP LEDs are really, really small (3.45 mm square to be exact) and come in a leadless surface mount package. While small is good, it's also a pain in the butt for prototyping. So, I designed a PCB that I should be able to mount in a variety of lamp housings.  I'm not exactly sure of the mounting details yet, but this one fits nicely into the Luxor lamp housing.  I used EagleCAD to design the PCB and got this:

EagleCAD LED disc board
There's a pad to mount the LED and a spot for a through-hole backplane connector.  A via is placed in the thermal pad to connect the top and bottom planes to dissipate heat. There's probably a total of 1.5 square inches or so of PCB that acts as a heatsink.  Hopefully this will be enough!  I also have a couple of holes for mounting a reflector.  The holes are spaced for this particular reflector from DealExtreme, although I've yet to drill and tap the pilot holes in the reflector body.  I used BatchPCB to get a few of these made. For $30 I got 8 boards shipped, but they wound up sending me 16! It takes about a month, so not great if you're in a hurry!

LED disc bottom
LED disc top

Ok, now what?  Well, with leadless packages you need to reflow; a soldering iron isn't much use. I use the stove top 'frying-pan' method, which is a variation of the hotplate/skillet method (scroll down...).  The frying pan method does not employ any temperature control. I just pop the PCB in the hot pan, press it down with tweezers, wait for the solder paste to reflow and then pull it out as fast as I can. This is potentially risky, as most parts have a maximum reflow temperature/time above which you can cause damage.  Here is the finished product:

White XP-G on LED disc board with reflector

I put a plastic adhesive reflector on it. Not sure if a reflector will be necessary or if the optics of the original lights will suffice.  Here's the red XP-E with 400 mA running through it:

Not much to see here except that it is extremely bright.  For the rear light, I doubt I'll need optics. The lamp's lens should be enough to diffuse the light.  At this point, I think decisions about which LED to use become a bit philosophical.  The Gold Dragon Plus can put out 118 lumens of red light at 1A.  The XP-E in the above photograph is probably putting out about 50lm and it is blinding. When flashing it will be even more noticeable.  It also gets quite warm, so it might not be a good idea to put more current through it.  I'm going to have some PCBs made for the Golden Dragon just to try it out, but I doubt the existing design will be sufficient to handle the heat it will produce at full current.

Sunday, September 25, 2011

charging supercapacitors

Supercapacitors are super because they can have much higher energy densities than capacitors that aren't so super.  A capacitor becomes super in the tens to thousands of Farads range, compared to the measly pico to microfarad range of not-super capacitors.  The eventual development of cheap supercapacitors seems to be what has led to the 'standlight revolution' in commercial dynamo lighting systems.  Back in the old days, when you stopped your lights would go out, although I've seen references to a few obscure vintage lights with battery powered standlights.  Now, when you stop, a charge stored in your light's supercapacitor can keep the LED on for a few minutes.  Supercapacitors are a good choice for standlight power as they can be charged up very quickly and can go through many many more charge/discharge cycles than any kind of battery.
3V 20F supercapacitor. Yours for only $8.38 CAD!

While these commercial standlights work well, my main complaint about them is that the lights dim significantly when they switch to capacitor power at a stop.  Commercial standlights typically use a 5.5V 1F capacitor. This doesn't store enough energy to keep the LEDs on at full brightness, so the discharge of the capacitor is slowed by dimming the LEDs (this applies mostly to the standlight for headlights).  Personally, I'd rather have a brighter standlight, which should be possible with a larger supercapacitor.  Higher value supercaps are, of course, bigger and more expensive than the little Gold Caps that are used most frequently.
b&m taillight guts

The biggest issue with supercapacitors is that they can only handle small voltages, typically between 2.5 and 3.0V for supercaps over 10F.  If you charge them beyond that voltage they can be damaged, or worse.  So, strict voltage regulation is required.  Another big issue is that you need to limit the current going into a supercapacitor. They'll take what current they can get, as they appear to your dynamo as a much lower resistance load than your LEDs.  This means your lights won't come on until your capacitor is charged up.  Finally, the low voltage of of the capacitor creates a problem for lighting LEDs. LEDs typically have forward voltages (Vf) in the 2 to 3V range, but don't operate at any voltage below their Vf.  So, a 2.7V supercapacitor can only drive a 2V LED until it reaches 2V.  With 2V across it the capacitor still has lots of juice left in it, but the LED can't get it out on its own.

This is a functioning DFN-DIP adapter, but it took a while...
My first solution was to double them up in series. Two 2.7V 20F caps can become one 5.4V 10F cap, giving plenty of voltage overhead for powering LEDs.  Turns out, voltage balancing is crucial when charging a supercap stack, as any unbalanced voltage can cause one cap in the stack to go overvoltage. Linear Technologies makes some nice looking chips that take care of that balancing and limit the current too.  I started with the LTC3225, which, on paper, looked like a perfect solution.  I went to the trouble of soldering the tiny 8 pin leadless DFN package onto a homemade DIP board before I wizened up and found an adapter board from Ancaster, Ontario's very own Proto-Advantage.  The LTC3225 worked as advertised except for one crucial aspect: despite programming it to charge the caps at 200 mA, I could only get it to charge at 30 mA.  Either I was doing something wrong or the one they sent me was way out of spec.  Either way, I opted to try another Linear supercap charger, the LTC4425.

LTC4425 application schematic

The LTC4425 worked and I was able to get it charging up a supercap stack at 200 mA (or whatever current was programmed with the Iset resistor).  In practice, however, the LTC4425 couldn't limit the inrush current of a discharged stack, which meant that for the first few seconds, all of the available current went into the supercap stack and none went to the LEDs!  As soon as the stack had some minimum voltage across it, the current regulation would start working properly.
LTC4425 MSOP-12 package. Pain in the butt!

While this was kind of a bummer, it pushed me towards a cheaper and probably better solution. While working with the LTC4425 I was introduced to a wonderful little chip called the ZXSC310 by the wise folks at candlepowerforums.  This is a LED boost driver than can drive LEDs with a Vin as low as 0.8V.  With a supercap charged up to 2.7 or 3.0V, there's plenty of voltage overhead to drive power LEDs at reasonable currents.  In practice, the 310 worked great and eliminated the need for a stack of supercapacitors, which meant I only needed to accomplish the relatively simple task of charging a single supercapacitor.  This is easily achieved with a voltage regulator and a current limiter.

In my case, I chose a 3.0V linear regulator (potentially a bad idea as it has to drop a lot of voltage from the dynamo under certain circumstances), the MIC5209, and a current limiting load switch, the FPF2125.  This circuit very effectively limits the current going into the supercapacitor under all circumstances, so the LEDs get their share, eventually getting all the current from the dynamo once the supercap is charged.
Supercapacitor charging circuit

Thursday, September 22, 2011

tail lamps: to flash or not to flash

After the Sturmey Archer bullet lamp was stolen from my wife's 1966 Raleigh Superbe and my rage (which I documented on Craigslist) had subsided, I decided it was time to get working on a new lighting project.  I had also been eyeing my Mom's 80s Raleigh Sprite mixte that was sitting neglected and dusty in the garage for years.  My wife complained her Superbe was heavy and clunky (it was), and the elegant and lighter mixte was a better size and the frame was in much better shape than the beat up old Superbe.  I planned to fix it up, and a new bike was a good excuse for a new lighting system.

One thing that impressed me about the first system I built was how incredibly bright the rear lamp was. It was easily as bright as a the tail light of a moped, if not brighter.  My night riding is primarily done in the city where I feel especially vulnerable in traffic from behind, where, of course, I can't see what's coming.  Most bicycle lighting (and especially the premium kind), both battery and dynamo-powered, is focussed on the head light.  People take painstakingly staged beam shots of their commercial and homemade head lights using the latest and greatest Cree emitters and optics.  There seems to be a great amount of interest in the design, output and illumination patterns of head lamps.  As I don't often find myself careening down steep hills in the woods or mountains on moonless nights, I must admit that I don't share this fascination with my fellow bike light aficionados.  I do, on the other hand, fret quite often about getting mowed down by a car coming at me from behind as I wait to turn left at a traffic light in the city.  So, in my lighting system I plan to devote as much or more attention to the design and output of the tail lamp.

First and foremost, I want the tail lamp to be bright. Really, really, really bright!  Second, I want it to be diffuse, so it can be visible from a wide angle.  Most commercial tail lights fail rather miserably at being both bright and visible at a wide angle.  Typically, they use multiple low power LEDs with optics to produce a bright but narrowly focussed beam.  I also want to be able to fit the LED and its associated circuitry and heat sinking into a variety of vintage tail lamp housings, which are considerably more elegant than contemporary offerings.  I'm especially fond of fender-mounted tail lights.

Finally, I want my tail light to be able to flash.  Interestingly, Germany, the mecca of dynamo bicycle lights, has laws governing bicycle illumination and has outlawed flashing bicycle lights. Several other European countries have also made blinking lights illegal.  Since these are the markets that dynamo light makers primarily sell to, there are no (as far as I can tell) commercial offerings for flashing dynamo lights. The wise lawmakers of these nations must have well-considered reasons for outlawing blinking lights (although apparently Great Britain has revised their lighting regulations to allow flashers). They mesmerize tired or drunk drivers, interfere with night vision, make distance hard to estimate, annoy other cyclists riding behind you, etc, etc. There seems to be a litany of reasons for their banishment from a nation's pedal cycles. However, over here in North America I can think of two very good reasons why one would want a flashing tail light:

  1. Almost every cyclist uses a flashing tail light for urban night riding. That's just what's been marketed to us by light makers and it is now the unofficial standard of North American bicycle lighting (blame the half-decade ubiquity of the knog or the superlfash!). As a consequence, it's what both cyclists and drivers are accustomed to.

  2. In an after dark urban environment, solid, low power, narrow beamed tail lights have a lot of other light to compete with. In these parts there's been a proliferation of European-style commuter bikes with dynamo lighting. As such, they come equipped with solid tail lights. My experience riding behind such bikes is that their tail lights kind of get lost in the optical cacophony of car lights, street lights, commercial signage, utility and emergency vehicle lights, etc. So, in the same way an emergency vehicle has strobed lights to grab your attention in an already visually busy environment, a bright strobing tail light on a bicycle screams out 'DON'T RUN ME DOWN!'

That said, in cases where flashing lights are not appropriate (avoiding arrest on cycling trips to Europe or long night rides with other cyclists, for instance), there's a requirement for the flasher to be disabled.

During my design process, I discovered one reason why light makers haven't bothered to make a flashing dynamo light.  Turns out, they are kind of difficult to implement. The big issue is what to do with the power of the dynamo during the off cycle of the blink.  Dynamos are essentially constant current devices and their voltage is primarily determined by their speed and the resistance of the load.  So, disconnecting the load (during the off-cycle of a flash) causes the dynamo voltage to spike, which has the potential to make things smoke!

After much effort, though, I now have a working prototype of a dynamo-powered flasher, the details of which I'll post soon.

back to the workbench!

Well, it was three summers ago that I worked on the lithium ion dynamo charging circuit.  The lighting system itself worked very well as a 'be-seen' light for riding around the city, especially the rear light, which was really impressive.  The LED was very bright, without optics and the lens on the tail light diffused it nicely to make it visible from a fairly wide angle.

Unfortunately, there were a couple of mechanical and design issues that ultimately led to its retirement. First, the old Sturmey Archer lamp switch was pretty flaky and getting the knob in just the right position to make contact and turn the lamp on could be tedious.  The first failure came when one of the internal wires popped loose, most likely due to a combination of vibration and my bad soldering!

The real problem, though, was the lack of a proper load switch in the design.  The battery was in parallel with the charging circuit and the LEDs and I think those LEDs could draw more current from the battery than the dynamo could replace while riding.  This meant that proper battery charging could only happen during day riding with the lights off.  Riding at night for long enough could deplete the battery completely.  The charging circuit could provide enough current to drive the LEDs from the dynamo, but they went out, of course, as soon as you stopped.

An improved design would have incorporated a load switch that would disconnect the battery from the LEDs while the bike was moving and connect them only when stopped. However, even lithium ion batteries have a limited lifetime, so in the long run, this design wasn't viable for the obsessive technical idealist in me (in practical terms, with a proper load switch I expect a lithium ion powered standlight would've lasted years).  Commercial dynamo lights use supercapacitors to store energy to keep the lights on while stopped.  Supercapacitors can be charged up very quickly to hold just enough energy to keep your lights on for a few minutes.  Better yet, they can be charged and discharged hundreds of thousands of times (or more) before their performance declines.  Adding a supercapacitor requires careful design, requiring both the voltage to be strictly regulated as well as limiting the charge current.  At the time, I felt such a design was beyond my technical expertise.

Anyway, the lithium ion standlight on my wife's bike didn't get much use; she was very pregnant by the time I finished the project and didn't really start riding again until autumn of 2009.  At this point, some of the aforementioned issues arose, but the impetus to start working again on dynamo lighting circuits in earnest came when some absolute fucker decided that he needed the Sturmey Archer taillight more than my wife's bike needed it.  The thief, who knew what he was after, snipped the wire and, with tools he must have brought specifically for the job, removed the taillight and courteously replaced it with a crappy chromed plastic Cateye taillight.  Most of the Raleigh Superbes I see on the street have dangling, unused Sturmey bullet tail lamps, so it was just my luck that probably the only other person in a city of 2.5 million people who had a thing for vintage Sturmey Archer tail lamps happened across my wife's bike and decided to steal the rear light.

Around the same time, I was starting to get obsessed with vintage French bicycle lights from the 50s and 60s.  Unlike their British and American counterparts, who used chromed steel, many French lamp makers used polished aluminum, resulting in many elegant and well-perserved specimens.  After several months hanging around Ebay France, I had secured my first set of hammered Luxor lamps.

So, with a nice set of lamps and the demise of my wife's bike's lighting system, I started to look again into designing a modern dynamo-powered LED lighting system with a standlight that could be retrofitted into vintage lamp housings.

Thus far, much progress has been made, which I will chronicle here!