Archive for the ‘Electronics’ Category.

Building Headlights

I played with building my own headlight back in November, and just got back into it last Saturday and yesterday. I think I’m done with such projects for now and I’m using this blog entry to document what I’ve done so far.

What I’ve built

I built this headlight yesterday (click for an annotated slideshow showing the construction):

It looks nice, but this is a very basic light with no standlight. The brightness and beam compare well to a Niterider MiNewt USB-Mini headlight. This is good, but not as nice as the brightness on most commercial headlights.

In November I spent a lot of time experimenting with standlight electronics. Thanks to a lot of help from the CandlePowerForum I came up with a circuit that works pretty well:

Here is how the circuit works:

  • Therectifier is the circle on the left and turns the AC generated by the dynamo into Vcc (positive) and ground.
  • Most of the power runs from Vcc through the LED (D)and back to ground.
  • When the supercap (C, marked 10F) is discharged some power ispulled off to charge it. The LM317L is a simple voltage regulator that regulates the output from therectifier down to 2.1 volts (the maximum that the dynamo supports).
  • The ZXCS310 is a LED driver thattakes the power from the supercap (0.8 volts to 2.1 volts)and boosts it up to the power needed by the LED. Using this driver let me get all of the possible power out of the supercap and gave a runtime of around 8 minutes.
  • There is a bug in the drawing, the other side of L should go to Drive, not a mystery 4th pin on the ZTX618 transistor.
  • A more optimal design also has a transistor which watches for Vcc to drop to 0 and then disables the Shutdown pin on the LED driver. This makes it so that the LED driver isn’t running unless you need the standlight (the dynamo isn’t running).

I did a lot of playing with space layout and got a layout that would fit on a 2″ by 1″ board. I never did end up building that board.

I also built a housing for a LED headlight. It would use the same circuit, but 3 LEDs instead of 1. The housing is about twice the diameter. It looks like this:

The wall thickness on that housing is too thick (to make it possible to use screws to secure the front and back). It weighs a lot more than commercial headlights. The idea with this one is that one LED would be the standlight, and the other two would always be on. It should have been brighter than the commercial headlights.

Headlight Beams

All of these headlights use symetricspot lenses as on most battery headlights (like theNiteRider MiNewt series). I don’t like that beampattern too much because if they are aimed high enough to see far down the road then they also blind oncoming traffic.Most commercial dynamo headlights use an asymetric beam whichis brighter at the top than the bottomand which has a sharphorizontal cutoff. That is similar to a car or motorcycle headlight and does a really nice job of lighting up the road in front.

Peter White has a long post with photo comparisons of headlight beams. The Super Nova E3 is a headlight with a spot beam (you can see that it is lighting up the trees and the brightest part isn’t the farthest) while the eDelux is a headlight with an asymetric beam.

The “right” beam is a subjectopen to debate, but I personally prefer the beams of the commercial headlights such as the Schmidt eDelux or B&M IQ Fly. The optics for such beams are hard to reproduce in a home workshop because there aren’t easily available lenses for them.

My Conclusions

I think I’m done experimenting with building my own headlights. Here is why:

  • It takes me about 4 hoursand $15-$20 in parts to build a headlight roughly as good as the $60 Planet Bike one, only it doesn’t have the standlight. Most of this time is machining time to build a housing. I don’t think that time/cost tradeoff makes sense.
  • Building a headlight that is as light, compact,and reliable with the same features as a commercial headlight takes even more time. It is difficult for me to do surface mount electronics with custom boards at home,and those are the features that make the commercial electronics so small.
  • I can’t build a headlight at home with a beam that is as good as the IQ Fly ($92). The IQ Fly is my baseline for a good dynamo headlight.
  • I don’t need a highlight brighter than the eDelux or IQ Cyo. I actually don’t want a headlight brighter than that, I personally don’t think that brighter is always better. I think the best reason to build LED headlights at home is to get the super bright spot beams that are useful when mountain biking.
  • It’s distracting me from my main fabricationgoal this winter (building a bike frame).

I have another project which will use my remaining LEDs (I’m building solar powered lighting for our shed). The supercaps that I bought will be useful in taillights (which I do enjoy making).

If anyone wants to buy my LED optics just let me know. I have 6 L2 OPTX (including adapter lenses) and 3 L2 OPTX 3 that I probably won’t be needing.

It’s too bad that there aren’t commercial standlight circuits for homebuilders. There are tons of tiny driver circuits available for home builders who want to make their own battery powered headlights.

New photos of taillight output

I thought of a better way to show the brightness of this home made tail light:

This shows the output of a Vistalite Nebula with pretty fresh AA batteries:

This is the output with my homemade light:

Yes, my basement is a huge mess. Want to help me clean it up?

A homemade dynamo taillight

A couple of years ago Mark Vande Kamp showed me a taillight that he was making. It looked neat on his workbench and then I sort of forgot about it. A few months ago we were out on a ride and I saw it in action and was amazed at the light’s brightness. It is much brighter than any battery powered taillight that I’ve seen.

He needed to build another so we ordered some LEDs together and I made one too. I’m so impressed with the results that I plan on making them for all of my bikes. This is the prototype.

I used a Cateye fender mount reflector as the body of my light. I only have one of these reflectors, if anyone has a source please let me know. The LEDs are drilled into the reflector lens (Mark bought a 5mm drill bit for this purpose).

I tried really hard to take photos of this in operation and you can see all of my attempts in the gallery for this project. Here is the best of them:

The upper tail light is a Vistalite Nebula. It has 5 LEDs and uses 2 AA batteries and is one of the brighter LED battery based tail lights available. This is a recent model (purchased within the last year) and is much brighter than the ones that they made a few years ago. You can see that the lower tail light, my homemade one, is much brighter. It is bright enough that I don’t like riding behind it and I’ve had comments from other cyclists on rides that basically said the same thing.

I don’t have a way to draw a schematic, but I think that this one is pretty easy to explain.LEDs have a positive and a negative side. In the taillight all of the negatives are wired together and all of the positives are wired together (in parallel). Each LED is designed for 40ma and there are 10 LEDs wired in parallel, so they are consuming 400ma total. The dynamo puts out 500ma total, so I’m over powering them a bit. There is a diode wired in the reverse direction of the LEDs to handlereverse current from the dynamo. You could make an even brighter taillight but wiring another 10 LEDs in parallel, but this one is already very very bright.

The LEDshave a voltage drop of 2V. 2V, 500ma is 1w (2 * .5 = 1).TheLEDs are only driven on half of the AC wave generated by the hub, so it is more like1/2 a watt. You could run these LEDs off of a battery at a 50% duty cycle like this, but with 2 AA batteries you’d only get a lifespan of about 10 hours. Thatexplains why the taillight is so bright.

The taillight is wired in series with the headlight. This is important and beneficial. It requires that the hub generate a little more power, but lets me usea 3w bulb up front.

I explained the schematic,let me explain how I wired it.There are 3 rows of LEDs and 4 rows of wire. The bottom row is wired to the negative pin on the bottom row of LEDs. The second from bottom row of wire is connected to the positive side of the the bottom row of LEDs and the positive side of the middle row of LEDs. The third row up is wired to the negative side of the middle row of LEDs and the top row of LEDs. The last piece of wire connects the positive side of the two LEDs. One of the black jumper wires connect the each of the positives together and the other connects each of the negatives together. The wires going to the dynamo are connected with one on a positive bus and one on the negative. Dynamos generate AC and LEDs are DC devices,so there is a diode wired in the reverse direction of the LEDs to handle current flowing in the other direction.

Note that my soldering is really messy. I mis-wired things the first time and had to desolder everything and start over. I’d also recommend covered everything in epoxy or tool dip to protect it from vibrations. When I build a second light I’ll update the gallery with photos of a nicely soldered one.

Someday I’d like to figure out how to build a standlight for this design. That will add complexity and the current design is really simple and very effective. If you have basic soldering skills and have a dynamo hub then I’d recommend building one. The parts are cheap (the reflector was in my parts cabinet, the LEDs cost 75 cents each, and the diode was about 50 cents). I guarantee that you’ll be surprised at the brightness.

Hacking Amplifiers

Side note: A number of friends have commented that my blogging completely stopped a couple of months ago. I’ve been busy with a new role at work and haven’t had as much online time recently. I have a lot to blog about, but less time to do it in. Expect a few entries rapid fire style over the next few days.

I’ve been wanting to make it easier to use the speakers in our kitchen and outside and at the same time reduce our power consumption for doing so. I had been using a single amplifier for either set of speakers and manually switching between speakers depending on which pair I wanted to use. Turning them on involved using the “second room” mode of our receiver even though I always had it playing the same sound as what was going on in the living room. This made it more complicated than necessary.

Getting away from manually switching speaker wires meant getting another amplifier. I had another use for this one, so getting a single amplifier that could handle 4 channels (stereo in the kitchen, stereo in the backyard) was the best solution. Commercial 4+ channel amplifiers are expensive, even when purchased used. However I did find a small kit made by a company called 41hz which promissed to drive 4 channels at about 50W each (way more than enough for background music speakers). The kit uses a Tripath chip, and I know from prior experience with the Teac A700LP amplifier that they sound very good and are efficient (so they use less power and run cooler). The kit also had a small number of parts which seemed good considering how long it had been since I soldered anything. At about $75 shipped for the kit, plus a transformer, case, and some connectors it was much cheaper than buying a commercial amplifier. So I ordered the kit and it showed up at my door a few days later. I also ordered a temperature controlled soldering iron, a cheap case, a transformer, and all of the connectors that I thought I’d need. At this point the total cost was at about $200… a little scary since I didn’t have anything that worked,but still cheaper than commercial amplifiers.

I spent a quite Saturday building it. It went together quite quickly,the most painful parts were surface mount soldering 16 diodes and winding 8 toroids by hand. By the end of the day I had this:

AMP9 board

Iwas happily surprised when it worked brilliantlythe first time that Ipowered it up.I used an old power supply from a long dead set of computer speakersfor testing because my transformer had not yet arrived. It sounded great with my simple basement test.

About a week later the transformer showed up and I got the whole thing installed into it’s case. I forgot to account for connector sizes and the size of the transformer when laying out the case and it turned into a very tight fit, but it did all fit. I also changed from using banana plugs for speaker connectors to Neutrik Speakon jacks, leaving me with some extra “ventilation” holes in the case. Overall I could have done a much better job of laying out the components in the case. The next one will look prettier and luckily no one sees this one because it lives in the basement.

Here is what it all looked like when assembled and connected to a single set of speakers:

and on the inside:

As you can see the toriodal transformer takes up the vast majority of the space. The board is hidden under the wires on the foreground. The heatsink was salvaged from an old Pentium MMX processor. That case is 10″ wide, 6″ deep, and 4″ high so the whole thing is pretty compact. Since it is living in the basement I put the switches, connectors, and volumepotentiometerson the same side, making it easier to setup and adjust.

When finally assembled I measured the power consumption at 7 watts when there is no input signal. That is a massive change from 80W on the old amplifier that I was using. That’ll save us about $5/mo in power bills.

While building all of this stuff I remembered reading that the $100 3-channel Teac A700LP amplifier that we use for the bathroom speakers is actually a 4 channel amplifier with only 3 channels connected. I decided to explore the insides and found that there are two 2-channel circuit boards for amplifiers and a mainboard that connects them to the chassis and input/output connectors. The mainboard was very well labelled and this made it easy add the 4th channel. I just needed to add an output and wire it all up. I didn’t even need an input because I wanted to use 2 inputs on this amplifier for 4 channels (two L outputs and 2 R outputs). I just tapped off of the existing L channel input. A couple of cheap parts and a 30 minutes with a soldering iron and I had this:

I just made a couple of modifications to the case to expose the new potentiometer for the 4th channel and the speaker outputs for the 4th channel. This time I was much more careful with my drilling and the end results look pretty good:

The power supplyin the Teac A700LP is a little underbuiltand wouldbe taxed if I ran all fourchannels at full power.For backgroundmusic use this isn’t much of a concern, it is rarely going to be used at anything other than low loads.

So there we have it.A few evenings of soldering and hacking and I got 2 4-channel 50W amplifiers for just over $300 total (including the $100 that I paid last year for the A700LP). They power the speakers in our bathroom, kitchen, upstairs deck, and backyard. The soldering projects were fun enough that I’m now considering making a small amplifier for work built around the 41hz AMP6 kit.