Replacing a driver that uses momentary switch

fedcas

Newly Enlightened
Joined
Aug 3, 2006
Messages
69
Location
Lucca, Italy
Hi,
while i was trying to mod my fenix HL21 i shorted something and i burned the driver :sssh:
not a big deal, i would have probably replaced it with something else anyway. But... now i think of it: i think drivers are usually made so that they swith mode when the input circuit is momentary closed and they stay on when the switch stay closed, isn't it? Now the problem is that on the HL21 there are no switches, there is a button and the battery is always connected to the driver, then when the button is pressed and impulse is sent to the circuit (it's actually 3 wires on the input side of the circuit, not 4, cause the switch has 1 wire in common with the ground. it basically closes the third connector to ground when momentary pressed)


what should i do?
 

hiuintahs

Flashlight Enthusiast
Joined
Sep 12, 2006
Messages
1,840
Location
Utah
Hi,
...........i think drivers are usually made so that they swith mode when the input circuit is momentary closed and they stay on when the switch stay closed, isn't it?

Now the problem is that on the HL21 there are no switches, there is a button and the battery is always connected to the driver, then when the button is pressed and impulse is sent to the circuit (it's actually 3 wires on the input side of the circuit, not 4, cause the switch has 1 wire in common with the ground. it basically closes the third connector to ground when momentary pressed)
what should i do?

To answer your first question, the answer is no that is not how they work. The power switch just provides power to the driver circuit. The momentary action of the switch just allows someone to lightly press the on/off switch to "on" without actually clicking it all the way on. This provides tactical operation of the light where you want to turn the light on or off at a moments notice. This has nothing to do with the "switching" capability of a switching type of power supply.

If the circuit is a current regulated driver, then it has to have some type of step up or step down voltage conversion depending on the battery configuration. The only way this can be accomplished in electronics is by using an inductor and switching power through the inductor in an on and off fashion. This is known as a switching type of power supply........and that switching frequency can be anywhere from 50khz to 1mhz and is pretty much determined by the switching regulator chip.


Now I'm not familiar with the HL21 but if you say there is no power switch but just some type of tactile feel type of button switch.........well that is OK too. I don't know what Fenix is doing here but I know what I did for a company once was to use a microcontroller that sensed a switch change that then woke the processor up from "sleep" mode, then did its thing such as set a different output and then went back to sleep again. That way it only consumed less than 400nA of power from 2 AAA batteries when in theory it was in the "off" state and you didn't need to actually have a power switch.
 
Last edited:

uk_caver

Flashlight Enthusiast
Joined
Feb 9, 2007
Messages
1,408
Location
Central UK
But... now i think of it: i think drivers are usually made so that they swith mode when the input circuit is momentary closed and they stay on when the switch stay closed, isn't it? Now the problem is that on the HL21 there are no switches, there is a button and the battery is always connected to the driver, then when the button is pressed and impulse is sent to the circuit (it's actually 3 wires on the input side of the circuit, not 4, cause the switch has 1 wire in common with the ground. it basically closes the third connector to ground when momentary pressed)
what should i do?
I think there's some confusion regarding words.
A momentary action pushbutton is still a 'switch', just like a typical tailcap switch (normally a locking pushbutton, possibly with momentary action on partial pressing) is.

Typical flashlight drivers are made to advance to the next power level when the power to the driver is briefly interrupted, since that's the simplest arrangement if a tailcap switch is used..

However, there are other drivers which are permanently powered and designed to use momentary switches to control the circuitry, but they are less common than standard flashlight drivers and I wouldn't know enough to give advice on particular ones which are available, or whether there might be any suitable for a 1.5V power source, though I'm sure someone here would.
 
Last edited:

uk_caver

Flashlight Enthusiast
Joined
Feb 9, 2007
Messages
1,408
Location
Central UK
If the circuit is a current regulated driver, then it has to have some type of step up or step down voltage conversion depending on the battery configuration. The only way this can be accomplished in electronics is by using an inductor and switching power through the inductor in an on and off fashion. This is known as a switching type of power supply........and that switching frequency can be anywhere from 50khz to 1mhz and is pretty much determined by the switching regulator chip.
That's not entirely correct.
While switching drivers are necessary when battery voltage is less than needed for the LED (as would be the case with the HL21), and are useful when the battery voltage is significantly above what is needed, if the voltages are suitably matched (battery voltage above what is needed but not greatly so), current regulation is easy without doing any inductor-based switching to change voltages - that's how a whole swathe of drivers using 7135 linear regulators work.
 

kosPap

Flashlight Enthusiast
Joined
Mar 1, 2007
Messages
2,909
Location
Naoussa Greece
no one can tell what is going on without pics of the driver.

After servicing a SmallSun copy of the Sunwayman Tc40S i found an interesting setup for the double switches...the tailcap was turning the current on and off, but the second switch that chages modes acted on the microcontroler chip...it cut the ground current when pressed, effectively turning power off from the chip but not from the driver power elements. So it signaled the chip what to do (advance modes)

This method is so easy and smart adn it fis the way the HL21 works (I am assuming so)
 

fedcas

Newly Enlightened
Joined
Aug 3, 2006
Messages
69
Location
Lucca, Italy
thanks everyone for the replies ;)

To answer your first question, the answer is no that is not how they work.[...]

Typical flashlight drivers are made to advance to the next power level when the power to the driver is briefly interrupted, since that's the simplest arrangement if a tailcap switch is used..

mmh i haven't understood what hiuntahs exactly means... what i meant with my first message is exactly what uk caver is saying (sorry if there is some confusion about some terms, but i'm not a native english speaker)

no one can tell what is going on without pics of the driver.

After servicing a SmallSun copy of the Sunwayman Tc40S i found an interesting setup for the double switches...the tailcap was turning the current on and off, but the second switch that chages modes acted on the microcontroler chip...it cut the ground current when pressed, effectively turning power off from the chip but not from the driver power elements. So it signaled the chip what to do (advance modes)

This method is so easy and smart adn it fis the way the HL21 works (I am assuming so)

you're right, here's a picture.
so basically, led+ and led- on the upper part. On the lower part V+ and GND from the battery are always connected (1*AA ni-mh) and the TE connector is the one that is normally open and gets shorted to ground as long as the momentary pulsebutton is pressed.

according to the few things i know about electronics, it's a step up circuit controlled with that pic 12F629. The other codes on the chips are: 3036 (lower, left corner), SDBD (middle), MCF B (right side), C00A (right side just above the bigger inductor)


YJp3fMy.jpg



http://i.imgur.com/mFHmQFR.jpg

Your images are oversize, when you post an image please remember Rule #3

Rule #3 If you post an image in your post, please downsize the image to no larger than 800 x 800 pixels.

Please resize and repost. - Thanks Norm




i was also thinking about some microcontroller (or maybe a 555 configured as flip-flop, cause i've never programmed pics) but i think the problem is that all those kind of chips won't work witch 1,5 VCC. Maybe I have to leave the step up converter always powered on to suplly a proper vcc to the pic/timer... but wouldn't that leak a sensible amount of energy over time?

it would probably work if use 1x14500 (and the possibility to use li-ion was one of the main reasons why i wanted to mod the headlamp... but i also want to keep the possibility of using 1x ni-mh should i run out of li-ions)



so let mw knoe what do you think... any help would me much appreciated! unfortunately i realize about the interface problem when it was already too late :s
 
Last edited by a moderator:

hiuintahs

Flashlight Enthusiast
Joined
Sep 12, 2006
Messages
1,840
Location
Utah
What is your electronics background? Do you think you could just repair this board? Looking at it, it has a strange shape unique to the headlamp and so a substitute driver would not fit well.

I think I'd just attempt to repair the existing board. But that is me and I realize that it would be a lot harder for most people to do this. As long as the PIC12F629 hasn't been damaged, then you could stand a chance since there is no way of ever knowing or replacing the code in the PIC microcontroller.........even if you did replace the PIC.

If going the repair route, the first think I'd do is put 1.5v to the headlamp (single battery installed) and see what voltage you get at the PIC12F629 pin 1. Pin 8 being ground. That is the VDD (power) pin of the microcontroller. If it isn't above 2.0 volts the PIC won't even be on. Then you can work back from there and see why. If it was above 2.0 volts then I'd look for activity on the pins indicating that it was still functioning.

In my opinion, the suspect parts are one of the SOT footprint parts. But we'd have to figure out what they are by observing how they are hooked up in the circuit. I can see 2 boost circuits on there........one obviously for the LED and the other for running the PIC. Do you have a scope or just a DMM?
 

uk_caver

Flashlight Enthusiast
Joined
Feb 9, 2007
Messages
1,408
Location
Central UK
What does 'I shorted something' in the original post refer to - was it a short of the LED, some metal object touching the driver board, or was the short inferred from the driver stopping working?
 

hiuintahs

Flashlight Enthusiast
Joined
Sep 12, 2006
Messages
1,840
Location
Utah
What does 'I shorted something' in the original post refer to - was it a short of the LED, some metal object touching the driver board, or was the short inferred from the driver stopping working?

Good point uk_caver. Knowing the symptoms of how the failure occurred might help in determining the location of the problem.

Fedcas, I wouldn't be worried about leaving a microcontroller powered on all the time if it is designed right. Knowing that a PIC is in here should be piece of mind because there are ways (ie: use the sleep command in code) to put that into a very low power consuming mode when it just sits idle. The microcontroller then comes out of sleep mode when it detects an "interrupt on [pin] change" or other means which is all software determined by the original designer.

The microcontroller is at the heart of this design and as long as it is working you stand a good chance at repairing this. I question why you would want to change this design unless you have the skill set to improvise for form and fit along with electronic design.
 

fedcas

Newly Enlightened
Joined
Aug 3, 2006
Messages
69
Location
Lucca, Italy
thanks a lot! ;)
don't ask me how is that possible, but now it's working again! ;)
just for your informnation, the problem was caused by inverting the + and - from the battery on the driver. the battery case has a mechanical polarity protection, but there's no electrical protection i guess cause when i inverted the cables the pcb got really hot.

anyway, the reasons why i wanted to mod/swap the driver (and also the reasons why i was not so interested intrying to fix the original one when i realized that i had broken it) are:
1) i swapped the XP-E for an XM-L2 cause the beam was way too much tight, so now the heat dissipated is much less, allowing me to drive it with more current and yet keeping the temperatures in the same range (consider that the original driver is set at around 350mA max, which is nothing for the xm-l2... and maybe i'd like some sort of turbo mode too for short usage.... that led is asking for more juice :p)
2) i'd like to use 1x14500 as well, in addiction to 1xAA nimh, to be able to exploit the xm-l2 and hopefully get a bit better runtimes (at the same output given by the nimh at full power of course)
3) not as important as the points above, but the lowest of the three modes of the original driver has a problem, it kind of flickers regularly every second or so (it's like if it's turning off the led for an instant) that is barely noticeable when camping in a tent for example, but very annoing for reading.


i think the pic directly drives the led, so it should not be possible to increase the current at which the led is driven without flashing it, right? if so, even if the original driver is working again, i'm still interested in swapping it with something that better suits my needs ;) by the way, i have no speace problems, the original circuit is kinda big so i guess most flashlight drivers should fit (definitely the 17mm ones, and i would have space left for a 555 or a small pic)
 
Last edited:

uk_caver

Flashlight Enthusiast
Joined
Feb 9, 2007
Messages
1,408
Location
Central UK
Glad to hear it's working again.
An XM-L2 will generate less heat than an XP-E at the same drive current, but not necessarily radically so if the XP-E was a recent top-end bin.
But if you were thinking of boosting the power a little, that might be possible, if there is a current-sense resistors you could alter the value of a little.
On your board the likely components would seem to be R17/R18.

Some voltage measurements taken across each of them (and between 0V and each end of both of them) when the unit is running could be useful as a first step to help determine how they are connected.
 

fedcas

Newly Enlightened
Joined
Aug 3, 2006
Messages
69
Location
Lucca, Italy
bingo! you're right it's a sense resistor! R17 and R18 are in parallel, so it's a 0,05 ohm resistor. i've done a few tries and i can increase and decrease the output of the driver by decreasing adn increasing that resistor value.

but there's just a problem now... any idea where i could find smd resistors (i think they are 0805) of around 0.1 ohm? i'm lloking on ebay but it's hard to find them below 1 ohm... and farnell/rscomponents it's not an option, shipping would cost too much.


or maybe... what kind of circuits i may expect to find resistors that low in value? i have some trashware i could look at
 
Last edited:

fedcas

Newly Enlightened
Joined
Aug 3, 2006
Messages
69
Location
Lucca, Italy
italy

btw:
should you need them, i've found a couple of uk sellers on ebay that have those kind of components, petelox and top-quality-tools, very expensive everywhere else in europe, but they have free shipping to uk ;)
 
Last edited:

fedcas

Newly Enlightened
Joined
Aug 3, 2006
Messages
69
Location
Lucca, Italy
you know what? i've found an smd resistor laying around, right the exact value i wanted to give me 400mA output... ;)

ym8H2l5.jpg


cXmd24c.jpg


EP9LPKl.jpg




can you think of any problem of using a long thin wire instead of a regular resistor?

also, i think the increased output should be ok from a thermal point of view, but what about the electronics? what component is actually driving the led, so maybe i can check on the datasheet if the current i'm using is ok (the original current was around 340mA i think... can't measure exactly cause one of the 2 smd resistors is somewhere on my floor :p)



thanks for all your precious help guys, i'll make some kind of modding guide for this headlamp so i can pay back the community ;)
 
Top