Improving the UF-H3B

Some time ago I treated myself to the UF-H3B. When it arrived, I was really excited because I had been lusting after this for quite some time, but could never justify to myself the slightly non-budget price tag. Well, I finally held it in my hands, but when I turned it on, I was instantly disappointed by the ugly blueish tint. The annoying ramping UI didn't do anything to improve the impression, but the killer was the ridiculously low PWM frequency.

Something had to be done:

Next up was porting the BLF-VLD to the new hardware. This turned out to be a quite complex task, not only because of the new type of MCU, but also because of the different types of operation.

Anyway, the new driver has four modes in the main group, fully programmable from 18 modes available in the extended mode group. Ten of those are constant light levels, ranging from 1,4mA to 700mA. The rest are mostly useless disco modes and beacon or distress signals. I had to fill up the program flash with stuff


To make future re-programming easier (or even possible), I connected all pins needed to a five pin, 1.27mm pitch connector.

I also wanted to replace the XR-E with a neutral white XP-G R4. Unfortunately, the original LED was just wedged into place without any support PCB. This just wouldn't have worked with the smaller footprint of the XP-G, so I had to sand down a PCB until it fit into the light.

Next I had to glue everything into place. This is where things got messy:

The plastic lens is glued to the body with Fujik silicone glue to make things waterproof. The LED's PCB is glued to the flashlight body with Arctic Silver thermal epoxy for improved heat transfer. On the right hand side, just below the screw hole, you might be able to make out the programming connector, fixed to the body with a standard epoxy glue. It's all pretty ugly, but it works.

So, here we are with a finally usable UF-H3B. It was a lot of work, but well worth it.

Nice work! I really need to start playing with my programming module and cables.

A caution on the Fujik glue, it can turn certain plastics "hazy" after a while.

Yours has 3 screws, mine from the group buy has 2 screws and a different internal structure… Hmmm…
Great job!! This is something that should have been from the start.

You got the UF-H2 from the group buy. This one is the UF-H3 and runs on an 18650 cell.

Yes, this is the 18650 version. I also got a UF-H2B from the group buy, which currently lies around disassembled because it is equally annoying for the same reasons. The UF-H3B was the first to get fixed because it is bigger and therefore easier to work with.

As for the Fujik clouding the plastic lens, I sure hope this won't happen, as this is really the only part not easily replaceable. OTOH, the inside of the light was filled with thermal silicone compound, some of it touching the lens. If the plastic was susceptible to this stuff, we probably would have heard of clouded lenses by now.

I've used Fujik on two lights with plastic lenses and one turned hazy after six months the other one took approximately nine months, so it was a really slow process. I potted the regulator in both cases, no fujik ever touched the plastic. Might have been some issue with that particular batch of compound though.

I have ordered UF-H3B yesterday from DX after drooling on it for quite some time. I also dont like how visible PWM is.

I already have USBtinyISP and looking forward to modify it, so I have a question about driver used in this modification:

Is it original driver from UF-H3B flashed with BLF-VLD?

As I understand, drives should have separate pins for connecting the pushbutton, but I didn`t noticed those drivers around.

PS. I like 45 deg. rotation of the new emitter. :) Nice touch!

I wish I had your skills cause I also really hate the blueish tint, yuck....

Like it otherwise, but is now used as a wardrobelight as the lightfixture in there is broken.

Is replaced with with a ZL H600 that´s really great! Not very budget though... ;-)

Can somebody shed some light on this driver, please? Somebody else opened H3?

That pushbutton instead of switch is confusing. Either original driver can be reprogrammed, or some other driver have pushbutton input.

I think the momentary button requires a major rewrite of the code - at least my TheKlone35 project needed a major rewrite of my luxdrv firmware.

Furthermore I guess this driver uses a PIC instead of an ATMEL/AVR which requires a different programmer and tool chain.

If you ever feel like taking payment, I've an H3 that could use those mods.

I like that mod partially. I havent received my H3B yet, but I think I'd want to keep the ramping mode.. any chance on a better driver with the same ramping functions of the original?

So you think it is original driver from the H3? It would be really cool if Tido could publish the code so others can upgrade their flashlights.

If just hex is published then is not big a problem. Programmers are really cheap to make or buy. I made myself Brenner 8P (http://sprut.de/) and USBtinyISP (http://www.ladyada.net/make/usbtinyisp/) Both are working fine.

It looks like the original driver.

@Tido: Is it an unlabeled PIC? Which?

What compiler do you use btw?

I wonder if I should get into PICs, too. Whenever I read about the details, I think I prefer AVR though.

The driver PCB uses some kind of MCU with a PIC footprint. I couldn't get the original chip into programming mode, so I replaced it with a 12F683. The PCB used a transistor controlled by an AMC7136 for current regulation. I replaced those with two 7135, one controlled by PWM, the other by digital I/O. The software is a PIC port of the BLF-VLD, with some modifications to work with the push button and an added low power sleep mode.

Since there is no free tool chain for the PIC14 architecture, I had to use htsoft's hi-tech C compiler. Which is a royal pain to use in the free "Lite" version.

So would you be so kind to share the hex code?

I would do required modifications once I get the flashlight.

There are alternatives to the HiTech Lite, with restrictions, too: I'll try microC, SourceBoost and/or CC5X if/when I get myself a PicKIT.

I'd need to check some tutorials to get used to the different registers etc.

fibra:

I'll have to check whether I compiled the driver using the "Lite" or the "Demo" version of the compiler. If it was done with the Demo version, I think I'm not allowed to distribute the binaries. I've been planning to do a final release of the the BLF-VLD, including the port for PICs and some special drivers, but so far I just couldn't find the time and motivation to put it together.

DrJones:

There may be other compilers, but SDCC just didn't work when I started with the PIC port and none of the others are free (as in speech) or even run natively under Linux. Since all the choices where bad, I chose the one which promised best support for the MCU.

Tido:

You have done an excellent work and I enjoy reading your posts. Glad to hear that you will have a final release of your wonderful BLF-VLD. I hope the final release will include the memontary switch for remote mode switching.

WELL DONE