# DIY SSCP7 headlamp and batteries for biking/runing/skiing



## -LightOn- (Jan 17, 2009)

Hi there,
as the title states I did a project led flashlight for bicycling, running and skiing. 

This post will divide into four parts: preparations, driver, battery packs and the light. 

The requirements for the lamp were:
1. Light weight and compact for running and skiing since the lamp is worn on the head.
2. High power for bicycling since speed requires you to see atleast some 40 meters or more. And the beam should be pretty wide too.
3. Enough run-time for my 3-4 hour bicycling exercises.
4. At least 2-modes because low mode is necessary for the suburbs (Don't want to disturb pedestrians too much).
5. Cost efficient. I know that e.g. Lupine lights that fulfill my reqs cost at least 500euros (650$) so if I can half this its good enough for me.

*Preparations:*
I did some research, reading these forums and couple of other places as well. Then I stumbled across this project https://www.candlepowerforums.com/threads/212401 from Jagge that gave me a good starting point. Mainly - that the P7 together with a R2-dropin would give a nice and wide beam. However I had to mod this design to fulfill the other reqs of my project.

I wasn't too convinced about the drivers DX and Kai are selling so I decided to build my own and have some fun as well since I'm an electrical engineer (power leds aren't exactly my field). The simple driver solutions were however for 1-mode constant current so I needed something to provide atleast 2-modes. I didn't want to code and program my own uC, therefore I ordered the d2flex. I also decided to go with Li-ions due to weight/capacity reasons.

Parts I ordered from DX:
http://www.dealextreme.com/details.dx/sku.5646
http://www.dealextreme.com/details.dx/sku.10788
http://www.dealextreme.com/details.dx/sku.3257 (reserve)
http://www.dealextreme.com/details.dx/sku.11836
http://www.dealextreme.com/details.dx/sku.4579
http://www.dealextreme.com/details.dx/sku.5790
Parts I ordered from Kai:
http://www.kaidomain.com/ProductDetails.aspx?ProductId=5485
http://www.kaidomain.com/ProductDetails.aspx?ProductId=1774

Then I got the bantam bc-5 balancing charger and did a DIY ATX-power supply conversion.


----------



## -LightOn- (Jan 17, 2009)

*Re: DIY SSCP7 headlamp for biking/runing/skiing*

*The driver:
*After some research I decided to go with a national semiconductor LM3401 based constant current driver. It offers low component count and has a dim-pin that can be used with the d2flex uC. National provides comprehensive and easy-to-use design tools that automatically give you the right component values, schematics, simulations, etc. I did some component research and decided to order the following components to my CC-driver from farnell:

LM3401 driver
1471047 PFET Fairchild Mosfet
8647879 schottky vishay vf=0,35V low Vf
1107403 Rsense vishay 70mOhms 1W 2512-package
176434 Omron low profile switch
4,9uH inductor Wurth 6,5A 16mOhms
1288204 Cin+Cout kemet 10uF 16V 0805
Rhys ja Rlim I already had 0805-package

I paid close attention to the signaling and component placing while drawing the pcb. I drew the pcb with Eagle-cad and did the first round pcb drilling on the prototyping machine. Did 5 samples and soldered one for testing. Here is the end result:






And bottom:





Excited, I went to do some measurements. Hooked up the lab power and the damn led started up! (First I made sure which way to connect the wires). But that was too good to be true. It turns out that the dim-input on the controller did not work. The light would not turn off no matter what. If I set the current limit higher on the power source the driver circuit started smoking or something did. I did some more measurements from the controller pins and it seemed to work fine. Then I noticed that the pmos was virtually on even though the gate was high?? What was wrong? I had connected the drain and source the wrong way around and there was a diode conducting all that current to the led. I stepped into this hole because in integrated electronics mosfets are identical between source and drain (even in layout) so it doesn't matter which way you connect them. But for power transistors, it seems that there is some extra stuff (like de-mos) that makes up the MOS.

Went back to schematic, did the PCB design and drilling again. Soldered a sample and went to measure. I turned on the power (while crossing my fingers) and success! Damn it was bright  Now the led turned on only when the dim-input was pulled high. If not connected it pulls high by itself so one needs to provide a pull-down resistor e.g. 10k to ensure that the led is off.

So I was set with the driver and eager to assemble the li-ion packs, which will be next.


----------



## -LightOn- (Jan 17, 2009)

*Re: DIY SSCP7 headlamp for biking/runing/skiing*

*Li-ion battery pack assembly*

I already asked on the forum few things about this. The general comment was that one souldn't solder li-ions and especially protected ones. But I tried and did it any way. So if you do the same, do so by your own risk. The cells can e.g. catch fire so be prepared for that.

Back to business... I got the protected trustfire 2.5Ah cells and started the assembly by hot-gluing the cells together in sets of 3 (since I was building a 2s3p-pack).





Then I glued the two sets together and secured the pack with tape.





After this I sanded the terminals of the pack lightly. Then I did some pre-soldering to the wires and cells. I had the iron at 450C and did a "1-2-3-solder in-4 and out" kind of sequence for each of the terminals. Then I soldered the wires to the top first (no risk of short circuit).





Note that the wires are soldered from one piece (except red line out) so that there are as few soldering events to the cells as possible. Then the bottom, same rules apply.





I soldered the balancing line wires and set up some shrink wrap to finish off the pack.





And here are the 2s and 2s3p packs ready. The 2s pack is for light weight and 2s3p is for long run time with high power.





My first experiment with shrink wraps didn't go exactly as planned so I had to use some electrical tape to finish the packs.


----------



## gillestugan (Jan 17, 2009)

Looks great! Good work with the driver. Have you made any measurements and calculated efficiency?
It would be nice to see how it compares to quality factory made P7 drivers like the Sharkbuck and the hipFlex. 



-LightOn- said:


> Then I got the bantam bc-5 balancing charger and did a DIY ATX-power supply conversion.


 I have the same setup. Works great for any battery. I also have soldered Li-ions in the same way


----------



## Jiffy (Jan 17, 2009)

Very nice! I'm seriously thinking about doing something similar.


----------



## -LightOn- (Jan 18, 2009)

*The Light
*As all the components for my project started coming in I got more and more excited. When I finally had everything except the lenses, I started putting the light together. Bellow are the components for the light:





As can be seen, I would stick two pcb-board into the lamp head and then take out the switch and battery lines. The piece of garden hose is to the bar mount that I am going to glue to the lamp head.

Originally, I had planned sticking all components into the r2 drop-in, but pretty soon I realized that couldn't be done. The diameter of the pcb's is 20mm while the inside diameter of the original drop-in was only 16-17mm. Using a P7-star is also useless in this case because it is so thick that you wont get the threads catching each other. Instead the led must be directly mounted to the drop-in base. I have used the useless star and cut it so that it fills rest of the drop-in base. I sacrificed a piece of a cleaning mob shaft (has a nice inner diameter precisely 20mm  ) for the housing of the pcb's. Attaching this housing to the lamp head proved impossible, so I had to make an extension piece to the lamp head where the housing part can slide on to. I machined it from a piece of heatsink with a dremel and epoxied it with arctic silver. The little heatsink on the right was epoxied on the lamp head to provide extra cooling. I planned to use the white piece for the tail cap but decided to machine another round cylinder from the bigger heatsink slob I had.

Here is the lamp, pcb's soldered together and ready to assemble.









The purple wire in the picture is the jump wire from d2flex switching transistor gate (not used) to the dim-input of my CC-driver. There is a pwm-pin on the d2flex but I was not able see a signal there so I soldered a wire directly to the uC-output pin.

I closed the whole thing, applied some epoxy to glue the tail cap and bar mount and I was done. Here is the result:




I had a biking accessory from some pump and I used the o-ring claw from that so I could easily attach my lamp wherever I want. However, it turns out that the epoxy does not want to glue the pvc-pipe so I'll have to modify this a bit later.

The whole thing with 2s-battery is pretty light, only 166g so my "compact and light" objective was fulfilled.









And the whole thing sits nicely onto my helmet even though I didn't use the bar mount. Additionally, I have an extension cord for the larger battery so I can stick it to the back pocket of my riding jacket. Otherwise, short cords can be used with helmet, headband or bar mount. Especially I like the switch I made, the low profile shrink wrapped omron switch works very nicely and is convenient when attached to the lip of the helmet. Later I'll do some cordura or neoprene cases for my battery packs so they are easy to attach.

I'll post some experiences, issues and remedies later because now I am just too :sick2: to continue writing.

(Gillestugan: I'll tell you this already. I measured the efficiency (based on knowing the Rsens and extention cord resistances) and it was 85% at room temperature.


----------



## gillestugan (Jan 18, 2009)

85% is really good for a buck with this high current output. Good work!

I like your heat sink. Looks like wings. Another solution is to use a heat sink for RC-motors as Salty at MTBR had done. Gives a larger contact area between the heatsink and the dropin.

Have you thought about adding a red led in the back? You can probably use 3 5mm in series with a small resistor.


----------



## Yucca Patrol (Jan 18, 2009)

I am using a product called "Plasti-Dip"which is a liquid rubber made to coat tool handles. For my battery packs, I first used their liquid electrical taped product and then covered that with the plasti-dip.


----------



## -LightOn- (Jan 19, 2009)

*Experiences, testing, issues and remedies.

*My first test was in a dark hall way of our lab. Set the lamp an a chair and went to see how bright the light was to people coming towards it. Answer, TOO bright, at least in high mode. So when moving around suburbs, the low mode comes in handy. I took the light for a 1.5 hour test spin out to the central park we have here and generally to the wood trails. The nicest and best thing about this is a very good beam width which is in balance with the lenght of the throw. So in another words, the beam is wide enough to see everything close by and long enough to see far enough in 30-40km/h speeds. This is the biggest improvement over my old fenis L2D premium 100 which has a too tight beam for riding. Sure it will illuminate far away but that's really no use in my applications. Bellow are beam shots of the fenix and my [email protected] for comparison. I marked the 10, 20, 30, 40 -degree beam angles on the tapes if that helps.
Fenix:





[email protected]:





I have a crappy camera and the pictures don't do justice to the light power, but you get the idea about the differences in beams. In general I would say that if with the fenix I could see well an area of 2 meters wide 10m away, now with P7 the area is at least 5-6 meters wide and with a bit more intensity as well. I did notice a significant portion of the light escaping upwards toward the trees where it is not needed so I'll add a little mirror to the top half of the reflector so that even more light will be reflected downwards to ground. Otherwise I had no issues whatsoever during that 1.5 hour ride with the 2s-pack of which I rode on high about 45mins tops. Cooling worked well, but it was like -6 Celcius outside so shouldn't have got any probs there. 

Then to the testing, issues and remedies. I did little heating testing in room temperature. With 20% duty-cycle the lamp body warms to about 42C and holds there nicely. With high the lamp body heats up to 65C and then the temp protection of the d2flex kicks in (set to 90C). I added little heatsinks to the diode and the switch. Pic show little aluminium pieces glued with fujik thermal silicone.





I thought I would be all set. No. I measured the little heatsinks while on high mode and the things got up to like 90C which is pretty much. Then I realized I must add a better thermal path from those heatsinks to the body. I did a 1/3 of a circle kind of piece and insulated it with thermal paste and epoxied to the heatsinks in the pic. I haven't yet tested the warming in room temp with the new modifications.

Another issue that I ran into was a bad solder joint or faulty wire. What happened after the first ride, was that I would hook up the battery then 5 quick flashes occur (d2flex menu entry) and then the light just turns off, few seconds, another 5 flashes, high mode, 5 flashes, low mode, off and so on. Man I was getting peanuts with this one :thinking:, I thought I had fried the d2flex. However, I measured the resistances of both battery lines and the negative was something like 30mOhms and the positive varied from that same 30mOhms to 3 Ohms to open circuit so no wonder that with high currents the d2flex saw these "battery supply disconnected and connected" incidents which led to the flashing sequences. Series resistance is very important in these high current applications. With good connections and soldering it is possible to do under 100mOhms lines to the led, but with 1Amp it is already 200mW of excess power dissipation.

I tested to functionality of the li-ion cells protection circuits. I left the light running on low mode until it turned off. The voltage across the battery got to 1.8V with load in place and 3.5V unloaded. So it can be that I managed to fry the protection circuits on my cells. Therefore, I designed a simple low-voltage cut-off that I am going to hook up to the light. It consists of a a zener diode which will begin conducting at 6.8V and with higher supply voltages will provide current across the resistor so that the gate of the first nmos goes high (above 0.7V) which pulls the gate of the second nmos low and leaves the the dim-pin floating or operational for the rest of the system. With voltage bellow 7.3V (measured) the dim-pin will be pulled down and led is turned off.






Hmm, what else? The waterproofing of the design so that it can still be opened for maintenance is a problem. To get the desing waterproof one could epoxy everything and the thing would be sealed forever, but to get even some kind of access later on I'm going to use an o-ring and some hot glue to seal off the head-body and tail cap.


----------



## -LightOn- (Jan 19, 2009)

Gillestugan: I am pretty happy with the efficiency too. I already have red back light so I wont be doing that mod.

Yucca: thanks for the tip. I have to do something about waterproofing the battery packs.


----------



## kuksul08 (Jan 20, 2009)

When did you order all that stuff? It's been 2 weeks since I ordered similar things from DX and still no shipment


----------



## -LightOn- (Jan 20, 2009)

kuksul: just before christmas eve. I was surprised how quickly everything came although I'm still waiting for the lenses (if they ever show up).


----------



## -LightOn- (Jan 27, 2009)

Update: As I am pretty happy with the design, I am still having a problem with heatsinking / overheating of the light. I did add an additional heatsink to the diode and transistor (pics above) , but the d2flex temperature cut-off at 90C still turns the light to lower mode after 5 minutes, even when outside. When riding with bicycle no overheating problems occur. Does anyone have any thoughts what could be done to improve this problem?


----------



## Jagge (Jan 27, 2009)

I guess it may overheat before lamp body gets hot. So the thermal path from driver/d2flex to lamp body may be not good enough. You get about 2W heat from drivers. I guess you havn't glued drivers it permanently with any thermal adhesive, right? You can try putting something less permanent, like thermal grease, to the edges of the PCB touching lamp body.

You will not need the full power if you are not moving, and you can turn it low when you stop, so it may not be much of a problem if you can get the thermal path only slightly better.


----------



## -LightOn- (Jan 27, 2009)

No I haven't glued it permanently, but the piece of heat sink which I added should be touching the lamp body. The lamp body gets to about 63C when the temp limit cuts in so the thermal path is good at least from the led . I think that it may help if I had the driver pcb the other way around and then I could glue it to the led heat sink??


----------



## gillestugan (Jan 27, 2009)

The temperature sensor is inside the 8 pin chip (U1), so you may use a small piece of copper plate to get it in contact with the lamp body. No need to cover it in glue.

Does your "wing" heat sink also get 60+ degress? 
If it doesn't get hot it may be better with a heatsink with larger contact area (like the RC motor heatsink)


----------



## -LightOn- (Nov 12, 2009)

I'm happy to report that the lamp has functioned perfectly for nearly a year now. It has taken all kinds of beating from rain and rough mtb-rides. The wide beam works really well on the trails. But as they say: when you get a taste of something good, you tend to want something better.

So I'm building another P7-light. This time I'm using the MTE-lamp as the body for my build. It will have a narrow beam so it will nicely complete my light setup. I will use the same driver and add a uC to the driver board as well so I don't need an extra circuit for the PWM-modes. 

Cheers.


----------



## vegarfo (Nov 13, 2009)

-LightOn- said:


> Then I got the bantam bc-5 balancing charger and did a DIY ATX-power supply conversion.


 

Hi
Cool durable light, man...!
Love the light, nice work...!
Can you tell me more about this charger stuff? any pics?

I'm goint to make somthing like this when i got som spare time :ironic:


----------



## -LightOn- (Nov 17, 2009)

vegarfo said:


> Hi
> Cool durable light, man...!
> Love the light, nice work...!
> Can you tell me more about this charger stuff? any pics?
> ...



Hi vegarfo,

I used these instructions to convert an old atx-power supply:
http://www.wikihow.com/Convert-a-Computer-ATX-Power-Supply-to-a-Lab-Power-Supply

Info about the bantam balancing charger is readily available on the net.
http://www.bantam301.20m.com/BC-5.htm


----------



## vegarfo (Nov 20, 2009)

Thanx man :thumbsup:

Will make me one soon :twothumbs


----------

