# Citizen Kane based DIY project (Hammond box light, 4xSSC P4, internal battery)



## bwack (Oct 11, 2009)

Hello. I've been following this group for a while. I fancy the Citizen Kane's Hammond light DIY and decided to do a mod. I will share some mechanical and electronic drawings with you. Keep in mind this is my first time using a 3D CAD software (Google Sketchup). There's alot of experienced mechanics in here for sure! Please tell me what you think. I'll provide many images of the 3D model with text in them (don't worry, they are small sized files for fast loading). I'm not english speeking person also, please excuse my english. Ok enough excuses..
Wow. This has been a steep learning curve. Watching youtube videos on how to draw 3D with Sketchup has helped designing alot. Its much easier to see how things fit together now. A 3D model of the Hammond box is available for download at hammonds website. I've used a plugin for Sketchup to convert from "iges"- to "skp"-files. I notice that "iges" 3D model files are the ones mostly available (for example at molex.com and hammond mfg among many). The STAR LED model was downloaded from Google 3D warehouse. A big thanks to the designer of this model. Maybe you are at this forum aswell.

*Features*
The features that makes this DIY a bit different than the others are:
- Integrated battery.
- Thermostat with dual tresholds (one for warning led, and the other for cutting the current at overheating).
- Pot-meter, sealed with pass-through rubber grommet on the pots axel. (see images).
- On/Off switch in pot-meter.
- Optional 8pin/8bit flash-based Microcontroller + mode-button. (create pcb footprint for soldering a microcontroller to the pcb for future firmware project).

*Images of 3D Model*
_Front_









_Rear_
The LED is for high-temp warning. The design may need a charging connector, or maybe ill just unscrew the cover to charge it.









_External Contents_









_Internal Contents (Side View)_
For the 4 SSC P4 i'm thinking a 4S1P 2600mAh Li-ion pack would do giving plenty of runtime (3h+) and enough voltage. A flat arangement of the four sels fit neatly inside the enclosure together with the leds. Battery mount-plate not yet designed.
I've been researching the forum for waterproof potentiometer, and such a part is not available. A rubber grommet with 6mm inner dia that match the
pot's axel diameter will hopefully keep water out of the case and the same time make rotation possible. Has anyone tested this?
So why the @£!# do one need a thermostat in this. Usually one just design for an operating temperature range, one would do alot of testing to ensure the light performance in that range. 1st of all, its just for safety and for variety (=funn). The LM56 is quite clever. It does all the analoge noise sensitive operations on its die and producing a digital cmos (open collector) output about the state of the thermostats. It has two thermostats that give four states. In other words its possible to monitor two thresholds. That gives many application uses. For this application i want the first threshold to be the point where a warning led is switched on (lets say at 50C), and the second threshold where the power is cut to protect the battery pack and LEDs (lets say at 60C). The thresholds are configured using three resistors (see datasheet  for details). 
(EDIT: image replaced. Previous image noted 4P1S which was wrong)









_Thermostat Assy_
This is the LM56 device with R0603 resistors mounted on it. Values will be calculated later. The datasheet note that the temperatyre is measured at the package-pins. To electrically insulate it from the L-profile-LED-mount (see image above), and conduct heat to it, it will be dunked in thermal glue and then glued to the rear of the profile, close to one of the LEDS.









_PCB Assy as seen from top_
The PCB is slided into the Hammond box's PCB-groves. The box is for 100mm wide PCBs and upto 2mm thick. Neat! The PCB connects battery pack, LEDs, driver, Pot, switch, and thermostat. The datasheet for the LM56 thermostat has loads of application notes. The same goes for the 3021E. More on that later when i post electronic schematics.
For the thermostats digital cmos output, signalling high and low will override the pot-meter outputs to the Ref input of the 3021E Buckpuck (datasheet). Can be somehow be _interfaced_ with the led driver by connecting it to a pnp transistor that has been connected in parallel with the thermostat.
The mechanical drawing showing hole positions etc will be generated using sketchup. There will be a challenge to get all the mounting holes and component placement aligned with the pcb-layout. I'm currently using Eagle. How do you do this transition from 3D cad to pcb-layout?









_Rear view again, without rear bezel_









Thanks for reading and for future comments. I really love it.


----------



## Itess (Feb 22, 2009)

That's really neat project. But main question is: why would you use SSC P4 and not latest Cree XP-G R5 as others do?


----------



## Madmusk (Nov 10, 2009)

Forgive me if I'm missing where you explain this but how is the battery charged? Do you have to remove it?

Love the Sketchup work. Man that is way more detailed than I would ever bother to do!


----------



## bwack (Oct 11, 2009)

Itess:
I started with 4-LED design to be able to use a combination narrow and wide optics, and I didn't find a BuckPuck with 2000mAh available here in norway. No good explanation for it really. I'm planning to replace the leds later after gathering some experience with thermals etc. The design will be easily modified by replacing the L-bracket. Ofcourze the driver must be replaced too.

Madmusk:
Thanks. The charger plug was left out because I've not found a good round DC-socket. I've had bad experience with those. There are some nice panel-mount DC-sockets used by others in this forum that I might consider. (yes there will be a charger plug).
It took some time to get used to 3D design, and yes its alot of details, but drawing 3D takes less time than one might think if one is new to it. Especially if you can find the components for download. Its also easy to experiment with different casings to see how things fit before buying  This is especially true if you include a custom PCB in the design. It makes it tidyer and things stay more secure to the casing.


----------



## sergio_pt (Jan 29, 2007)

nice projecting, looking good and organized. I always liked the idea of the rotating pot with on off switch.
And yes I would only change the LEDs to XP-G R5.
good work


----------



## PSpuza (Jun 6, 2009)

sergio_pt said:


> nice projecting, looking good and organized. I always liked the idea of the rotating pot with on off switch.
> And yes I would only change the LEDs to XP-G R5.
> good work


Hey where is a good place for XP-G's? I've looked at DX but they don't have them there. Thanks


----------



## PSpuza (Jun 6, 2009)

sergio_pt said:


> nice projecting, looking good and organized. I always liked the idea of the rotating pot with on off switch.
> And yes I would only change the LEDs to XP-G R5.
> good work


Hey where is a good place for XP-G's? I've looked at DX but they don't have them there. Thanks


----------



## Jim Z in VT (Sep 9, 2007)

Nice....we don't see many self-contained (batteries in the housing) lights here, I don't think ever one based on the Hammond boxes. Looking forward to seeing the finished light :thumbsup: 

What Itess was asking is why use the SSC leds now that the brighter and more efficient Cree XP-G leds are available? 

Will 5 batteries fit in there? That would be a better match with the Buckpuck and 4 leds.....the BuckPuck needs 2v over the Vf of the led series. And your batteries should be in series, not parallel. (or go 2s2p with a boost driver?)

@PSpuza: Cutter is the only good source for XP-G right now.

JZ


----------



## cytoe (Jan 20, 2004)

Looks like a lot of work...just to draw those pictures!


----------



## ortelius (Dec 6, 2007)

bwack said:


> The design may need a charging connector, or maybe ill just unscrew the cover to charge it.


I wouldn't rely on screwing/unscrewing the back plate every time you want to charge the battery. The back plate on Hammond case is screwed on with self-tapering screws, so after a couple of screw/unscrew cycles those taps in relatively soft aluminum will be damaged.


----------



## Ola (May 25, 2004)

I've also been looking at 4*18650 battery built-in version of Hammond light. Couldn't find any box that fits the battery dimensions.. and to give som feedback on your light I think it's kind of big and will occupy quite some space on the handlebar. 

4pcs battery is approx 75 wide, feels like to much dead area to use 103 wide box. Also thickness wise there's 8-10mm air above the batteries.

I think your idea is great but I would try to find a box/extrusion that better fits the batteries.

For example, 45*45mm * 2 thickness extrusion with inside dimension 41*41 would fit 4 batteries in square configuration, have less air inside and occupy much smaller space on the bar*.

(edit* I assumed it's a bar light since It will be quite heavy to have on the helmet.)


----------



## bwack (Oct 11, 2009)

Jim Z in VT (and Ola):
Thank you, yes indeed! I need 5 cells indeed to satisfy the 2V margin of the Buck Puck.
The previous image noted 4P1S but was supposed to say 4S1P. 
Yes, 5cells will fit with ~1.5mm clearing on the sides. Here is an image of it.








I've looked at this battery pack. With the clearing noted above, there should be some room for the wires exiting the batteries on the sides. Not optimal, but it should be ok. May need to plaster it to secure it from the sharp edges of the Hammond box.

Regarding R5. I've now read the datasheet. I was thinking they where 2A devices, but they are 1A. The lumen/watt ratio is really impressive compared to the SSC P4. If can get 20mm STAR version, is my Carclo optics and holders compatible? have allready bought this holder and some various Carclo (4 narrow and two wide).

(edit: Yes, Ola, it is a bar mounted light.)


----------



## bwack (Oct 11, 2009)

ortelius said:


> I wouldn't rely on screwing/unscrewing the back plate every time you want to charge the battery. The back plate on Hammond case is screwed on with self-tapering screws, so after a couple of screw/unscrew cycles those taps in relatively soft aluminum will be damaged.


Good point! I will look into this!


----------



## Ola (May 25, 2004)

Ok, 5 batteries will fill up the box much better.

Regarding optics, I've tried xpg's with carclo 20mm and it did not impress me. Found it quite bad actually. 

Since you have the space, the ledil 21.6 square optics (lxp or cxp, always mix them up) are much better than carclo 20mm. I buy ledil from bram at candlepowerforums. Search on "bram groupbuy cpf" and you should find him.


----------



## OverTheHill (Dec 3, 2004)

ortelius said:


> I wouldn't rely on screwing/unscrewing the back plate every time you want to charge the battery. The back plate on Hammond case is screwed on with self-tapering screws, so after a couple of screw/unscrew cycles those taps in relatively soft aluminum will be damaged.


I created a very similar design to this some time ago but abandoned the idea. The solution that I came up with for fixing the back plate was to use some threaded rod which screwed into the aluminium case where the self-tapping screws go. You could fix it in place with some epoxy like J-B Weld. Then if it protruded through the back plate by about 5mm you could use two knurled nuts to secure the back plate. That way you wouldn't be continually screwing in and out of the soft aluminium case every time you wanted to remove the back plate.

Nice design by the way bwack, it should make a great light. I'm into CAD myself for my light designs but prefer 2-D - it's the way I was brought up. You need to spend less time drawing though mate and more time building!!


----------



## bwack (Oct 11, 2009)

I've been busy this weekend on this project.
This is the electronic design. I have ordered the PCB from BatchPCB.com. See the schematics below. The PCB interfaces the BuckPuck 3021E with CTRL input LED driver. The driver is controlled by a pot, thermostat and microcontroller. The POT (PC1) also has an internal switch rated for 1A. Charger connector (J1) switches off the driver when charging. That switch is not rated so that can be interesting... If it fails I'll have to short that switch. Electrolytic Capacitors C3 and C4 is supposed to compensate for inductance in long battery wiring. Since the wiring is short, C3 and C4 will probably not connected. (as i recall, switchmode devices like this driver doesnt like inductance from the power supply (can some one correct me on this?)).

The microcontroller can be left out of the board, and the board should still perform well.

_The CTRL input._
The Potmeter PC1 set a voltage level on the CTRL input, and the driver converts that into a constant current value for the LEDs. This is done using information from the datasheet's application notes section. R1, R2 and T1 provides a CMOS-compatible CTRL-input. The thermostat and microcontrollers output is connected here (CUTOFF_N). Open-collector-like outputs are required if more than one device is connected to CUTOFF_N.

_Thermostat Assembly_
The thermostat Assembly
The thermostat LM56 is attached to the PCB via cables. Three resistors configures the two thermostat trip-values. I've selected 50C and 60C using R1=15k2, R2=1k4, and R3=10k4 (see the datasheet on how-to calculate R1, R2 and R3). A small 100nF capacitor filter some noise on the powersupply lines. A dab of Arctic Silver thermal glue is applied before attaching it to the back of the L-profile LED mount. I don't know if the glue will change the resistance. I'll have to test it.

Schematics









Layout









3D view









Ok thats it. The pcb is ordered and components are on its way!! Will switch to R5's also! Thanks for all help. And of course when the stash is in house, I'll show some build photos  I'll definetly not discarde this project in a long while, so a firmware is also be programmed. What mode's do you like ? I was thinking of a fast way of dimming the lights in passing to a user-programable preset. And if the button was to be hold for 2s, a blinking mode was selected/unselected.

Can't wait start the building


----------



## HuffyPuffy (Jun 9, 2008)

Hi, this looks really cool, I like the integrated setup with the battery. 

Can you explain how the pin 5 of the IC is going to work? I am not an electronics expert and am probably being dense, but I am thinking that it may interfere with the operation of the PNP if it is an input, however I don't see how it will provide anything as an output.

When running the blink mode, it looks like it would need to have the pot turned down low if blinking was to be seen - is this correct? I think that would be a plus since on my blink modes I have the low part of the blink set so it is not off, but just slightly less bright than the peak of the blink mode, helps to see stuff while it is blinking (no strobe effect). 

Just a thought on another way to control this - you could use the pot to control an ADC input on the IC and then have the IC control the control pin on the buck with a PWM out. That would basically put the IC in control and give some more flexibility. You could use the IC to control the temp and voltage triggers too. That is kind'a how I have mine set up, though I use a button for control of modes.


----------



## bwack (Oct 11, 2009)

Hi, thanks for the ideas. I'll explain the pin #5 at IC1 microcontroller (MCU), and how the CTRL pin is (or can be) interfaced.
But first, here is a newer revision (2.3) of the Buck Puck datasheet that takes out some factual errors in Rev 2.1. For clarity, if the CTRL pin is pulled towards 5V REF, the LEDs are dimmed. (CTRL voltage vs current output is inverse). For those interrested, here is the ATTiny13 datasheet

The direction of the pin5 on IC1 must be programmed. It can be an input (High-Z), or input with an internal pull-up, or an output pulling or sourcing current. I'm (almost) certain that the pin can be switched between active low output (pull-current) and a input (High-Z) in real time. In this way pin5 will function like the thermostats open collector output and pin5 will only be able to pull current through the pnp and never source current to the thermostat (that is fatal to the semiconductors!).

But your questions are 1. if pin5 will interfere with the pnp-operation, and 2. if pin5, as an output, will it serve any purpose?

1. If current is pulled through the pnp's diode, either by IC1 pin5 set to low or the thermostats open-collector output, the pnp "closes", overrides the pot, and switching off the LEDs. After pin5 or thermostat output is finnished switching the LEDs OFF, they must return to an High-Z state (as an input). If the pin5 is an input, in other words, does not pull anything through the pnp,I don't see how that will interefere with the operation of the pnp. R2 will keep the pnp "open" when no current is running through R2 (thats the case when pin5 is an input and the thermostat output is inactive).
I agree, using the pot with the MCU's ADC input would make the MCU more in control, but the concept is that the pcb can be used with or without MCU. Therefor the pot must not require a MCU on the PCB. .. Its a good idea actually... When thinking of it, the pots output could have been connected to both CTRL and MCU separeted by optional 0 Ohm resistor so that the pcb could be reconfigured at a later time (without having to order a new prototype). Lets call that Rev 1.1 of the board 

After reading my own explaination you may think its confusing, am I using pin5 as an output or input .The answer is: Both i think.. I think it would be nice to control the LEDs with pin5 as an output, but at also be able to read CUTOFF_N from the thermostat when pin5 is an input.

2. Pin 5 as an output will serve as a purpose. The output will be able to pull current through the pnp and override the pot. I was thinking of PWM to dim down the LEDs. The pot will then work as a "master volume control".

Blinking with more than 0% output so that it is possible to see at the same time as blinking is a good idea. Should be fairly easy with a PWM output of the IC.
EDIT: I just realized that you have allready made light-build with a similar electronic setup and allready know stuff about microcontrollers !! Btw i like it!
I also forgot to answer if the pot needs to be turned low if blinking was to be seen. Its the other way, the pot must be turned up to see the blink. The CUTOFF_N signal can only cut the current to the LEDs, it can't turn on the LEDs.


----------



## HuffyPuffy (Jun 9, 2008)

Sorry to raise a concern, and thanks for the explanation, I think I get how it should work now. Thanks for sharing the schematic too, although my mind was a bit haywire it got me thinking about a project I had on hold for a while which I need to get back to.

I had some beginners luck with my light, I used the PICAXE which is designed with students in mind so it is super simple to get going - so I am still a novice with PIC's. 

I noticed you have some other unused pins on your PIC, any plans for those yet? Maybe a low battery indicator?


----------



## bwack (Oct 11, 2009)

I like to have a battery indicator. Did you use the ADC inputs to monitor the battery ? How did you interface the ADC and did you power the MCU with the REF(5V) and LED- or the battery itself? Isn't it a problem that the ADC is referenced to ground on LED- and not the battery pole VBAT- ?


----------



## California L33 (Jul 30, 2005)

bwack said:


> Jim Z in VT (and Ola):
> Thank you, yes indeed! I need 5 cells indeed to satisfy the 2V margin of the Buck Puck.
> The previous image noted 4P1S but was supposed to say 4S1P.
> Yes, 5cells will fit with ~1.5mm clearing on the sides. Here is an image of it.
> ...


Do you have enough space for bar mounting hardware without interfering with the PCB? It looks like you'll need a fairly heavy duty mounting system with the batteries in the emitter case. And what about cooling? Will the emitters overheat the batteries? The nice thing about separate battery backs is that you don't have to worry about cooking the batteries, and your mount doesn't need to be as strong.


----------



## bwack (Oct 11, 2009)

There is space for bar mount, if one fasten it underneath the battery. The center of gravity is at or in the battery somewhere. The pcb is at the back, so there is no interference with the bar mount. Ill illustrate how i think it can be done.

Here is the back of the enclosure showing that the nuts on the L-profile LED mounts are removed to release space for the battery mount plate (plastic) (yellow rectangle below battery).









Here is a sideview, the text in the image explains.









The weight will be around 2-2.5x the other DIY builds without batteries. If there is no larger bar-mount, two Marwi bar-mounts might be good. What do you think, will this be enough?

About cooking batteries, the limit is 60C battery-temp. Regarding heat-removal, ill just have to see. Many others have reported that it doesn't get hot to the touch (with similar load (watts)), and their enclosures have alot lower surface area than this large enclosure. There is also a thermostat set to cut at 60C, and that is measured at the hottest point that is possible to measure in the enclosure (except for the emitters, they are hotter). Therefor i think the battery will not suffer damage. The performance has to be tested for several ambient temperatures and airflow/no-airflow. I can't answer you this now before testing it.


----------



## MtbMacgyver (Jan 23, 2007)

What are you using for li-ion battery protection. Are you leaving enough room in the case for a battery protection PCB? 

There are plenty of good protection PCBs for 4 cell packs. But now that you've switched to a 5-cell pack it'll be a little tougher. There are a lot of really bad 5-cell protection PCBs on the market. Most of the one's I've tested get around the lack of chipsets for more than 4 cells by logically splitting the pack into a 3 and 2-cell pack in series. The problem is they draw the power for the protection PCB itself from just the 3-cell portion. This causes the pack to become unbalanced and fail over a fairly short period of time. I figured this out when all my 5 cell packs failed after 2 years, but my 4 cell packs are still going strong after 5 years.


----------



## bwack (Oct 11, 2009)

Hi MtbMacgyver, thanks for sharing your experience with 5 cell packs. I bought this battery pack. That webpage link to this PCB. Its a one single pcb for all 5 cells, I assume it doesnt divide the pack into two and three cells.(?)
Did you experience this problem with 5 cells with a Li-ion pack from batteryspace.com ? Another question, was it possible to save the pack after it failed, or was the voltage too low on some of the cells?



MtbMacgyver said:


> What are you using for li-ion battery protection. Are you leaving enough room in the case for a battery protection PCB?


Yes, the battery in the 3D model has PCB and polyfuse included in the total dimentions (the bluish transparent box). It wil be tight, but still air around the battery pack.


----------



## bwack (Oct 11, 2009)

The datasheet for the PCB notes that it "adopts" Seiko S-8254 protection IC. It is for 3 and 4 cell packs. I guess its bad news.


----------



## MtbMacgyver (Jan 23, 2007)

Yes, the packs were from batteryspace.com and they used 2 Seiko S-8254 protection chips on a single PCB. Since the packs had become unbalanced, the lower cells were going down well below 3V per cell and the higher cells were well above 3V per cell at the overall cutoff voltage for the pack of 15V programmed into the driver. Regularly discharging the lower cells below 3V per cell caused the capacity of those cells to degrade. I took the packs apart and profiled all the cells individually and all the low cells had very degraded capacity. So there was no way to save the packs. 

I looked at the specs on the protection PCB in the pack you ordered and it's not the same PCB that was in my packs. It looks like a later generation PCB and it's not one that I've tested. I reverse engineered the circuit design of the PCB in my packs and it would have been possible with very careful design to avoid drawing unequal amounts of power from different cells in the pack. 

The supply currents for these protection PCBs is extremely small, but they are drawn all the time. So if they are not exactly equal per cell, the protection PCB itself becomes an un-balancer. It's also cumulative over time regardless of charge / discharge cycles since these packs are not charged with balance chargers. They rely on everything staying exactly equal over time for the pack to stay in balance. With well matched cells and a proper protection PCB, it actually works quite well. I have 4-cell packs that are still balanced within 0.01 volt per cell after 4 years and approximately 100 cycles. 

If I had realized the pcb in the 5-cell packs were unbalancing the pack earlier, I would have put a balancing connector on the pack and charged it with one of my RC balancing chargers instead of my normal bike light charger and that would have saved the packs. 

It is actually a pretty tricky design problem to build a protection PCB out of multiple ICs. It would be a lot easier if you used two identical protection IC that could be configured for either 2 or 3 cells. Then one IC could cover 2 cells in the pack and the other one could cover 3 cells in the pack without any overlap. It would work well as long as the IC consumed the exact same supply current from each cell regardless of whether it was in 2 cell or 3 cell mode. 

The basic problem with the board I had is the 8254 can only be configured to support 3 or 4 cells. You can't come up with a non-overlapping coverage of 5 cells. So they had the circuit designed where one 8254 was slave to the other in a pseudo overlapping arrangement. It functioned correctly except for the flaw that it consumed current from the cells in the pack un-evenly. 

Since I haven't tested the exact PCB in your packs, I really can't say if it'll have this problem or not. I guess the only way to know for sure would be to open the pack up and do some testing. That's kinda a catch-22 since opening the pack up will likely void any warranty on the pack. 

I quit playing with this issue, because I used the 5-cell packs with my DIY HID lights. Now I've moved fully to LED lights and all my lights use 4-cell packs. I did find a protection IC from Maxim that could support more than 4 cells. I was thinking about building my own protection PCB right before I stopped using my HID light regularly.


----------



## HuffyPuffy (Jun 9, 2008)

bwack said:


> I like to have a battery indicator. Did you use the ADC inputs to monitor the battery ? How did you interface the ADC and did you power the MCU with the REF(5V) and LED- or the battery itself? Isn't it a problem that the ADC is referenced to ground on LED- and not the battery pole VBAT- ?


IIRC the 5v reference from the buck was used to power the PIC and I used the LED- as ground for the PIC and thermostat. I did use the ADC input to sense the battery voltage, though a resistor divider which I set up with the worst case for my largest pack in mind so I did not exceed the max input voltage. I'm not sure this was the best way to do though, and if I did it again I would have to try to think of a better way. It seems to work well enough, though I had to make some software tweaks to get a good solid reading on the pack status, otherwise the status LED would flicker between empty/low/full readings.


----------



## California L33 (Jul 30, 2005)

bwack said:


> There is space for bar mount, if one fasten it underneath the battery. The center of gravity is at or in the battery somewhere. The pcb is at the back, so there is no interference with the bar mount. Ill illustrate how i think it can be done.
> 
> Here is the back of the enclosure showing that the nuts on the L-profile LED mounts are removed to release space for the battery mount plate (plastic) (yellow rectangle below battery).
> 
> ...


I guess you will have to test it. I don't know if 60C is the failure temperature, or operating temperature. Most batteries last longer if they're kept cool. And if you're making this for production, then potential buyers have to consider battery replacement. It would require exact replacements, not just the same type, voltage, and similar amperage. And with internal batteries you can't carry a spare pack for long rides. It still looks like an interesting project.


----------



## bwack (Oct 11, 2009)

HuffyPuffy said:


> IIRC the 5v reference from the buck was used to power the PIC and I used the LED- as ground for the PIC and thermostat. I did use the ADC input to sense the battery voltage, though a resistor divider which I set up with the worst case for my largest pack in mind so I did not exceed the max input voltage. I'm not sure this was the best way to do though, and if I did it again I would have to try to think of a better way. It seems to work well enough, though I had to make some software tweaks to get a good solid reading on the pack status, otherwise the status LED would flicker between empty/low/full readings.


Using a voltage divider is normal and i think you did it well. Sounds like LED- can be used as a good enough reference. Great and thanks for the before-hand experience..


----------



## HuffyPuffy (Jun 9, 2008)

No problem, I am learning from threads like yours so thank you too. 

One thought on the bar mount. I can't tell if the embedded nut is in the center of the enclosure, but if it is, I'd suggest moving it to the bottom of the plate and not allowing the hole to go all the way though. If the bracket mounting screw were overtightened it could impact the middle cell and cause something bad to happen.

Another option on the bar mount would be to make another plate mounted outside the case with 2 screws which would fall between the 1-2 and 3-4 cells, then the bar mount could be mounted to that plate.


----------



## bwack (Oct 11, 2009)

I've started building the L-profile LED mount with the LEDs, and I've done some preliminary thermal testing.

_L-profile LED mount_
Two bookshelf L-profiles where cut to size for the purpose, flat-sanded away deformities at the two heat-conducting surfaces, and drilled+threaded holes for giving a good thermal contact to the Hammond Box. They could have been glued, but i prefer thermal paste+screws to be able to upgrade the LEDs later.









The Leds themselves where glued with Arctic Silver









After mounting the L-profile to the Hammond Box, i had to check that the battery would actually fit. And it did.

















_Preliminary Thermal Testing_
I did some thermal testing after screwing the L-profile LED mounts to the Hammond box. Thermal paste (zalman) was used between the L-profiles and the box. A thermocouple was placed on the back of one of the stars. (you can see it in the picture below, the brown cable ending into one of the holes behind a star). The box was closed and then put on a stand









Temperature at back of the star reached 63C after 45min (4 LEDs SEOUL P4 in series at 1000mA). Ambient temp was 23C. Thats 40C above ambient without any forced air (convection only). I guess that the thermostat will only have to kick in in the cases when not cycling in hottest days in the summers (30C ++ but then, atleast here in Norway, the temp drops to 20C at when it gets dark). When i get the battery and electronics in the case i will try to get some operating temperature measurements for the battery. I'll have to bring the multimeter to the paths to do some real world testing too. Will be fun


----------



## California L33 (Jul 30, 2005)

bwack said:


> Temperature at back of the star reached 63C after 45min. Ambient temp was 23C. Thats 40C above ambient without any forced air (convection only). I guess that the thermostat will only have to kick in in the cases when not cycling in hottest days in the summers (30C ++ but then, atleast here in Norway, the temp drops to 20C at when it gets dark). When i get the battery and electronics in the case i will try to get some operating temperature measurements for the battery. I'll have to bring the multimeter to the paths to do some real world testing too. Will be fun


Here in California, even in the North, we occasionally get very hot nights- maybe once or twice a year. One memorable midnight it was 38C! (27C isn't uncommon, happening a dozen or so times a year). Too hot to sleep, you've got to go out and ride  Of course you get a fair breeze blowing over the lights when you're moving, and no radiant infra-red from the sun. I've never had a light overheat, but I always turn them down when I stop.


----------



## ortelius (Dec 6, 2007)

Are those L profiles from aluminum? They don't look so, they look like they are from iron. If that is true, you should probably consider to make them from aluminum or copper, as iron has rather poor heat conductivity, compared to Al or Cu.


----------



## bwack (Oct 11, 2009)

Yes. They are stainless steel. I'll use alu for the cree's and do another thermal test.


----------



## MoonCo (Jan 4, 2010)

If you want an accurate thermal test you should seal up the fixture. With all the ambient air around like it is right now you will probably be about 10-15*C cooler. Also don't set the enclosure on wood or concrete try to mount it to something that mocks a handle bar or where ever you might mount this thing. LED's usually get to a stablized temp in about an hour and a half so run your test longer unless you see them stabilize. As they approach a stabilized temperature the temp will crawl up really slow sometimes I have seen this ramp up another 10C.


----------



## bwack (Oct 11, 2009)

MoonCo said:


> If you want an accurate thermal test you should seal up the fixture. With all the ambient air around like it is right now you will probably be about 10-15*C cooler. Also don't set the enclosure on wood or concrete try to mount it to something that mocks a handle bar or where ever you might mount this thing. LED's usually get to a stablized temp in about an hour and a half so run your test longer unless you see them stabilize. As they approach a stabilized temperature the temp will crawl up really slow sometimes I have seen this ramp up another 10C.


I'm rerunning the test now with the box sealed completely this time. The fixture is placed on a stand so that air is flowing freely underneath it. The test doesn't look good so far, it has reached 43C above ambient (22C) allready after 30min @1000mA. Its climbing extremely slow and I'll let the test go for the full 1h 30m like you said.


----------



## bwack (Oct 11, 2009)

It reached 49C above ambient (22C) after 1h 30m @1000mA. I'll retest with Alu profiles and Crees for comparison when those get in house.


----------



## OldMTBfreak (Apr 8, 2006)

Hi Bwack, you are going to get much better results from aluminum. Use 1/4" al. angle, use al. on the bottom also, that'll carry of lots more heat. Good job BTW. James


----------



## bwack (Oct 11, 2009)

OldMTBfreak said:


> Hi Bwack, you are going to get much better results from aluminum. Use 1/4" al. angle, use al. on the bottom also, that'll carry of lots more heat. Good job BTW. James


Thnx, and I've ordered a Alu angle. Its 4mm thick (0.16"). I'm having limited space.

---

*Building the Thermostat Assembly*
_DIY dual thermostat_

Hey folks, thanks for all advice on the way of building this light. I'm waiting for cree's and alu-heatsink. In the mean-time I've been assembling and testing the tiny dual thermostat LM56. 
It may look like an imposible solder job, but bear with me, its not that bad. Using tiny dots of superglue as your third-hand, things don't fly around while mounting and soldering up 0603 resistors and cables. Using a small 10x10mm pcb would have done this job easier, but the pcb will be replaced by Epoxy. I'm used to solder small parts in a stereoscope at my last workplace. Now that I don't work there anymore, I used a simple&inexpencive loupe this time, and i can confirm that depth-vision is null with a loupe.

_Attaching the passive devices_
The resistors (size 0603) where applied a tiny dot of superglue and added to the LM56. After some time, soldering them to the LM56 was done. This part was easy, just add some tin with the iron, and the tin flows over all the surfaces needed by itself. A capasitor (1206 0.1uF) was glued to the LM56. This will stabilize and filter incomming noise on the power supply pins.HuffyPuffy says that its possible to control the temp-thresholds with the microcontroller. Pin5 has a "temp to voltage" that can be feed to the uC ADC. I'll try that later.









_attaching cable, epoxies and final assembly_
Wires to the power supply are soldered to both capacitor and power pins. The last two wires are attached to the thermostats outputs. These are very weak solderpoints and cable strain can easily cause failure. Epoxy will relieve strain on these pins.
As noted earlier, temperature is sampled at the package pins. When thinking of it, it would have been better to use thinner wires (maybe awg 28 or 30) to improve surface temp readings. Anyway, pins and top of package where dunked with heat-conducting glue (Arctic Silver) to distribute heat to the pins equally. Later, clear epoxy was added to relieve cable strain on the solder points. At last the wires where put into the cable connector housing.









Ofcourse it needed to be tested, and it tested quite well. I made a simple test circuit with leds to indicate the outputs (ill leave that image out, it looks like birds nest). It has the disadvantage that the relative thick wires (awg 24) cools the pins and that gives false reading, IF the surface temp and wire temps are far apart, but if the surface temp and wire temp isnt too far apart it'l be good. If this type of component is available with a heatsink-mount, that would be much better.


----------



## bwack (Oct 11, 2009)

California L33 said:


> Here in California, even in the North, we occasionally get very hot nights- maybe once or twice a year. One memorable midnight it was 38C! (27C isn't uncommon, happening a dozen or so times a year). Too hot to sleep, you've got to go out and ride  Of course you get a fair breeze blowing over the lights when you're moving, and no radiant infra-red from the sun. I've never had a light overheat, but I always turn them down when I stop.


Thats hot !! Hopefully the Alu will provide much better performance. 49C above ambient is not acceptable. It would probably not have been much impovement in cooling while riding because the iron is so poor in conducting heat, but Alu, yes 

While reading this it was -22C (-7.6F), but that was one of the few extremes in Oslo.


----------



## HuffyPuffy (Jun 9, 2008)

Wow, that is some fancy soldering! I am gonna have to borrow the superglue idea.

On my last light, I did not use an ADC sensor for my temp sense though it should be pretty simple, maybe with some experimentation to get an accurate result. I used a TC622 http://www.mouser.com/Search/ProductDetail.aspx?R=TC622VATvirtualkey57940000virtualkey579-TC622VAT which was just a thermostat with a set point, but it has a big mounting surface.

I think for my next one, I am gonna try a digital sensor like the maxim DS1821 or a cheap analog sensor since they don't need all the parts and are smaller. The digital sensor looks pretty cool but they are expensive. While I was looking at sensors at Mouser, I found these which are really cheap and would use the ADC input to sense, gonna pick one up with my next order:

http://www.mouser.com/ProductDetail/Microchip-Technology/MCP9700A-E-TO/?qs=sGAEpiMZZMsrT%252b%252bRgDw3NpFlqic4N01K8xcIMtH9ROM%3d


----------



## bwack (Oct 11, 2009)

Thank you for the links to components. Will a thermistor (with signal conditioning) also work with the ADC, lets say if one can accept say +-2C error?

I recall testing the DS1820 (Dallas semiconductor?) device. It came with a developement board for PIC controllers (mikroE EasyPic 5). The device has a one-wire protocoll wich makes it excellent for lengthy wiring with a multiple on the same wire individually adressable (digitally) makes it easy to measure distributed temperatures. Its no longer available, but DS18S20 is. This one a little bit cheaper than DS1821. It doesn't have the programmable feature as the DS1821, and its only a thermal sensor (not a thermostat). I like the MCP9700A, its so cheap


----------



## bwack (Oct 11, 2009)

This post will be long. Enjoy the build photos and happy weekend everyone!

Santa arrived with LEDs and PCBs this week.
(dancing madly)
BatchPCB fabricated my PCBs and their quality is impressive. They are cut to the exact length. I assemebled it, fully tested it, and wowee all functionality is as intended. The electronics is a success (microcontroller part not tested yet). The mechanical design still got many flaws. I want to show you the progress in my selfcontained light.

_The new PCB_

In the image no.2 below, connectors from left to right; thermostat, mode button, LED+/-, and BAT+/-. Dang, when the thermostat connector is mated, it is ~3mm too long. Replace with vertical equivalent.
I love the PCB cable terminal blocks when debugging, but as a user safety, they should be replaced by a battery connector.
The pot (center) had to be lowered. I knew this, but i didn't know that it would be that difficult to modify its legs. It worked out fine for now. The pot could also clear more space for the cable harness running behind it.

pcb rear









pcb front (with more components added)









_Assembling the new Alu L-profile and LEDs_

As noted, Santa was here. He gave me some Ledil CXP realspot and oval optics for XPE. Holders with adhesive tape are included. I also got the Cree XPG R5 LEDs mounted on 20mm star (Cutter). I couldn't get my head around how to wire them up because there is no place to put the wires between the holder and star. Was no problem with Carclo, but I guess the CXP holders need the full adhesive surface area for strength, and a special MCPCB is needed. Anyway i want ahead drilling after seeing some hints written by Cutter in another post. New problem, I had to mill away some plastics to get to the star terminals. The result is shown in the pic below. Not one of my greatest work.. but im happy with it. The important thing is to maintain solder quality and optic/emitter alignment.









Test of concept. hmm I detect sewwwious problem with thermostat connector obstructing the battery as noted earlier. Not much space for the thermostat between leds and battery when the Alu L-profile is mounted, but it should be enough. I should make the thermostat a bit thinner, but i'm planning to use a thermal sensor instead. (The blue tint from leds is due to camera is set to incadecent/indoor white balance).









The new Aluminim L-profile assembled replaces the iron version. This went all well. It should improve heat conduction. A 1mm plastic plate cut from cd cover is glued to the L-profile to protect the battery from protruding screws and heat (i think) (not shown here). This will also make the battery flush with with the top and the bottom of the whole enclosure to ensure not ratteling inside. Holes are M3 threaded. The large top surface should provide fair thermal contact with the enclosure. Finally, thermalpaste was added and mounted to enclosure.









_Assembling with battery and pcb_

I mounted the PCB to bottom cover plate. See image below.
The delrin spacers work a charm, PCB slides into the enclosure's slots perfectly.
Problems: needed some tape-insulation on the pcb pins near the enclosure and battery connector. A 2mm shorter PCB width would help lots so that wires could run freely between battery and pcb. Originally, the pcb was mounted upside down. I'm planning to redo this because of the problem explained above. I want the cover to be removable without hassle, to be able to arange cables before closing the cover, easier to debug, easier to replace the battery, and most importantly to be able to connect cables to PCB without having to do it as shown in the picture below.
















This is what I have till now. I like it  (The wire-bike on the left in the right pic was bought in brazil by an excellent wirewrapping artist). I'll take it outside and do some shots later. Did some preliminary testing out the back. We have ~80m to first white wall of a flat, and ~120mm to another light brown flat. The ground is snowy, so I can't tell exactly how this performs in the summer, but WOW i'm amased of the throw of the Ledil spots! The white balance is colder than the daylight white SSC P4 leds with Carclo optics. Anyways but they are not bluish. There is some green tint, I can see some of the green emitter projected, but that is minimal to none. It may be the fact that I am using the XPE and not the XPG version of the Ledil CXP optics. Shooting at some good photographs at home show good color rendering in all colors, but i must say I liked the SSC P4 daylight emitters better. This bicycle light is not a photograph-light anyway, and the intensity of the R5 is so much better and efficient.
















_Summary of wanted improvements_

- 2 or 3 mm shorter pcb width. (pcb to battery clearance)
- lower pot component height, or replace with IP68 panel type.
- increase space behind pot.
- vertical connector (thermostat)
- battery connector.
- thinner thermostat device or replace with thermal sensor.
- mount pcb upside down (mount to top of enclosure).

other future improvements:
- Control CTRL pin by MCU only.
- no sudden cutoff when overheating.
- replace 5S1P to 4S1P and replace buckpuck with boost regulator circuitry.
- use the charging connector as a power source for a secound light aswell as for charging.


----------



## bwack (Oct 11, 2009)

California L33 said:


> Here in California, even in the North, we occasionally get very hot nights- maybe once or twice a year. One memorable midnight it was 38C! (27C isn't uncommon, happening a dozen or so times a year). Too hot to sleep, you've got to go out and ride  Of course you get a fair breeze blowing over the lights when you're moving, and no radiant infra-red from the sun. I've never had a light overheat, but I always turn them down when I stop.


Hello. Its almost been a year. Picking up the hobby again, its autumn in the north. Darkness is comming sooner by the day.

Obviously, putting a battery inside the thingy will set a worse limit for heat. The Iron profile was just stupid. It built up 49C above ambient messured behind the stars. All test where done with unit sealed and in open space without any breeze. I did another thermal test after finishing the Alu mounts. The new Alu mount got the stars to 27C above ambient. This is the surface temp behind the star, so nearby the temp will drop dramatically. The battery does not have direct (thermal) contact with the enclosure.

If you concider the surface area for heat disipation, Rule of thumb, leave atleast 6 cm^2 / Watt (surface area to power ratio). (Magic Shine is ~2-3cm^2/watt). The ratio for this unit is 12.4(cm^2)/W (!).

I have trouble mounting the unit to my bar. I don't have access to hardware tools. Do you think Fimo could be strong enough? I was thinking of molding some simple mounts with rubberbands. .something like this..


----------



## HuffyPuffy (Jun 9, 2008)

Hi Bwack, I don't think fimo is not strong enough. Epoxy putty may be if it were somehow reinforced with some fibers or something, though I am not sure how that would be done. You could probably fabricate some U channel to do what you want there, just put some bolts though it to hold the bands or maybe even hack up another mount to use.


----------



## BrianMc (Jan 5, 2010)

If budget allows, a pair of EL34's QR barmounts with the two light mounts' 'ears' removed and then bolted to the bottom of the case could do the job. Having used them singly I think there should be enough flex to allow alignment and slidng into both mounts. It won't be as quick a quick release and remount, but it should work.


----------



## bwack (Oct 11, 2009)

The budget was passed a long time ago :ihih: I'll buy a couple of QR barmounts.

Here are some preliminary beamshots.
MTBR settings -0.5EV exposure.
1. AIM 1W-ish. Usable for emergency light, slow riding and powerful flashing.
2. Vetta MicroLux, modded from luxeon-III to SSC P4 @650mA. Doesn't look like much here, but it is usable for moderate speed, spotting people, and passing people with black invisible dogs.
3. 4x XPG-R5 @1A each, Ledil optics, CXP 2x oval, 2x spot. Like day and night compared to the other two lights. 
  









I suppose one wide optic, one spot and two spots could make a better distribution.. Or perhaps a single oval pointing lower than the rest with its own cheepo driver so that its possible to avoid blinding people but at the same time have good lights in front of the bike.


----------



## HuffyPuffy (Jun 9, 2008)

bwack said:


> I suppose one wide optic, one spot and two spots could make a better distribution.. Or perhaps a single oval pointing lower than the rest with its own cheepo driver so that its possible to avoid blinding people but at the same time have good lights in front of the bike.


It looks good to me, seems to be just floody enough. Maybe for a commuter light it would be better to have the hotspot hit the ground closer though.


----------

