djozz driver hack #2. (was: Colour driver build, based on D882 sot89 transistor?)

Hi, I had a defective Intl-outdoor 17mm RGBW driver and had a bit better look at it, not sure if someone else did that before, I thought I'd post it anyway:

I removed the lower left chip (and one resistor, I needed that one to boost another RGBW driver) to show the circuitry better.

Not being much of an electronics expert, it looks like a simple set-up: it is very similar to a 7135 lineair driver except that the chips (marked D882, sot89 package) are not current regulators but transistors (amplifiers), so the output current(voltage?) is not fixed but dependant on the input current(voltage?) coming from the MCU, regulated by simple resistors in between.

So, the MCU provides the switching and PWM for each emitter, and the resistor between MCU and transistor determines the output of each transistor.

I looked up some specs of this D882 transistor, and there my knowledge is limited, but apart from the other specs (like max. dissipation of 0.5W, this could be a limiting thing) it looks like you can go up to 3A, for what that is worth. At least a CPF-member (conte, here) found that halving the resistance on the white circuit part on the intl-outdoor driver gave 1.3A to the white die instead of the stock 700mA. I copied his mod and got 1.1A in one of my builds.

These transistors are dead cheap and easily available (also on ebay), is it an idea to build a BLF-RGBW driver based on these, with better modes than the intl-outdoor one? Even more simple would be to flash BLF firmware on the existing driver of course, but there's no markings on the MCU, so I that could be difficult to find out.

This is where my input stops, since I can not build drivers or program chips. Perhaps a suitable MCU is already difficult to find or program. Can anyone more educated than me tell if this is a viable track to follow?

Edit: 4/11/2016 progress in post #11

Cereal_killer will be here shortly…I believe his RGBW driver uses transistors to regulate the FET’s…

He knows ALOT more about that than I do (he truly has become the master :slight_smile: )

Googled D882, found this
http://www.datasheetarchive.com/dl/Datasheets-SW7/DSASW00139055.pdf

With that said…wonder if these could be used to replace the 7135’s…or was that what you were asking all along? :wink:

Can’t tell by your photo…but what is the pin on the MCU connected to the base (gate for FET) of the transistor?

I’m guessing here as well

That may be what the resistors are there for, to control the amount of current going to the base, thus giving each transistor a different level output, I think if you fed the signal straight in from an ATtiny it might be too much and smoke the transistor…I believe FET’s are MUCH better at handling that kind of current though

As I said though MUCH more knowledgeable folks will be here shortly

From the small understanding I have of transistors, the D882’s and the resistors are acting like FET’s for the 4 channels of the RGBW, each one is independently controlled, my bet is that is some sort of PIC w/ at least 4 channels output on the IC

Looks like all the collectors are connected to the ground ring
Common collector circuit?

Thanks for the input WarHawk, I was wondering about that, so they amplify current. (my knowledge about transistors does not go further than what I learned at secondary school, I have even forgotten the difference between NPN and PNP transistors ).

I am beginning to think that I am re-re-re-inventing the wheel here, and that Cereal_killer's drivers are based on about the same kind of component.

EDIT: no, not exactly, like already mentioned above by WH, his driver uses a final FET connected to the transistor output, perhaps to make it handle more current, but still the intl-outdoor driver gets away with just a transistor, at least up to 1.3A, which is a nice current for both the colour XM-L and the colour xpe2's.

i had to google it to corner my excitement for the existence of such a thing… a community atmel-based open source rgbw driver, yes please =)

I know most of the people here prefer Atmel, but I have pic based rgbw firmware that has been open source for a long time, and looks like it could be a drop in replacement in this driver. Details and code are here:Everett's projects: Super RGBWUV flashlights

I have quite a few new features since that post as well and I’m happy to share the source. A BLF member actually reviewed one of my more current rgbw lights here if you’re interested: Custom Romisen RC-C6 / The Little Light That Could

So it might be easier than I thought to (re)build this driver :-) . To get it going someone could make a design in Eagle (trying to get the two resistors and cap that are now very un-elegantly on the battery side of the board to the emitter side?) and upload it to Oshpark, a couple of components (worth $2 ?) need to be bought and the MCU must be flashed with suitable (tterev3's) firmware, then the lot reflowed onto the board.

I'm not sure if there is a niche for this, it is a simple (perhaps even one-sided) board but there are already great options out there, such as DrJones' rgbw driver and not the least Cereal_killer's new rgbw-clicky driver that can handle more current than a driver like this.

And of course, I can not do anything myself, I do not even have access to a cheap source to all the components here in the EU, let go flashing stuff and so on (I can order Oshpark boards and reflow the components, especially if everything is one-sided :-) )

tterev3’s code (which is for a 12F617) will work on my driver with zero hardware mods! Same for Matt’s board but at only 1x 7135 per channel.

Just keep in mind parts for a single driver will run you around $9 (plus shipping) so in the end you’ll probably only save $2-3 over just buying a ready to install driver from me ($20) with my FW. If you want a whole bunch of fun modes (and dont mind not having brightness control over the individual colors) definitely consider super RGBWUV, I’ve ran it on my driver and it is fun (tho with that many modes I definitely prefer MELD for the much more advanced control).

Pretty much any of our options are far better than that I.O. POS driver and its horrible modes.

As I said: I'm not sure that there is a niche for this, perhaps the single claim to fame could be that it is single-sided (in my small 14500 colour-xml build a two-sided driver would not easily fit).

BTW, here is one feature that is very well done in the 'horrible' intl-outdoor UI: it returns to the first mode within 1 second after switch-off. So whatever mode you're in, a 1second half-press will get you back to white light. This makes the intl-outdoor driver pleasant to use, even though it only has very simple single colour modes and some not very useful disco modes.

The gate input to a FET acts much like a capacitor. It is sensitive to voltage and does not draw much current at all except whwn the drive signal is changing.

A bipolar transistor input acts much like a LED/diode and is driven by current… hence the need for current limiting resistors.

ding ding ding :slight_smile:

Oh and apologies…I totally forgot the RGBW mastah tterev3

...necro-ing an old thread of mine....

...and renaming it :-)

1.5 years ago I suggested using the set-up of the intl-outdoor RGBW driver for a new BLF driver design. I can't do electronics, I can't do software, I only know Ohm's law and have a veague idea what a transistor does and a FET, so I hoped that it was picked up by someone. Well, no one did so I did some hacking of the driver myself today and was quite succesful sofar. Perhaps this raises interest after all to do something with this driver?

What did I do?

*There's 4 channels, the stock user interface starts with channel 1, half press for channel 2, half press for channel 3, half press for channel 4, en then some uninteresting blinky modes.

*Each of the 4 channels is regulated by a transistor that is directed by the MCU for on/off and a resistor between MCU and transistor for the amount of current (stock resistor is 911 Ohm, for a current of about 700mA for each channel, the exact current is a bit dependent on the type of led).

*For channel 1, 2 and 4 I tweaked the resistors: 39kOhm for channel 1, 4K7 Ohm for channel 2, 39kOhm for channel 4

*On channel 3 I removed the transistor and replaced it with a FET (I had a small N-channel FET that I got from Cereal_Killer in a distant past). I also halved the stock resistor to 455 Ohm by soldering a 911Ohm on top (for historical reason, the FET also worked on 911Ohm). I have no idea what a FET needs and what comes out of the MCU, but it just worked

*I made a triple with a XP-L Hi 7A1 led, an Oslon SSL80 4500K 96CRI led, and a Prolight Opto PK2N pc-amber led.

*I connected channel 1 and channel 3 to the XP-L, channel 2 to the SSL80, and channel 4 to the pc-amber led.

*I got the following currents on a purple Efest 14500 cell: channel 1 ~30mA on the XP-L Hi, channel 2 220mA on the SSL80, channel 3 3.45A on the XP-L again, channel 4 ~30mA on the pc-amber led.

So the UI now is: start on XP-L low (estimate 10 lumen), half press for SSL80 medium (estimate 50 lumen), half press for XP-L high (estimate 600 lumen), half press for amber (estimate 5 lumen). And then some weird blinkies, but a slow half-press always brings back the first mode. I will know the outputs exactly when I have build this in a S2+ shorty sometime in the future. Every output is without PWM btw, and in the process of tweaking I was able to make a very low moon too, using 1MOhm.

I have no idea how this driver modded like this holds up in use in a flashlight, but I'm pretty surprised that everything I thought out worked just like that.

further progress in post #14

Replacing a transistor with a fet. You know far more than I. It sounds like your on the track to somewhere.

And still I have little clue what I’m doing electronically. If I read in the Attiny25 developement thread, apart from software things, how much electronical stuff needs adjusted all the time, I feel a bit lucky that this just seems to work.

And at least I’m on track to my ideal simple effective driver for a single led flashlight too, without having to do anything that I am not able to do (like programming/flashing MCU’s): 4 modes, no memory, each mode fully adjustable (by choosing components) from lowest moon to direct drive, each mode real current, no PWM.

I finished the mod with this driver!

The host is a Convoy S2+ with rubber boot (I like the rubber boot version better than the metal switch one, it looks nicer and the clicky feels better), in fact the host that came as the 365nm Nichia S2+ that was a good deal at Banggood a few weeks ago. I salvaged the UV-led for another test one of these days. I ordered separately two black shorty tubes from Simon, but today I found that the one tube that I had leftover from ReManG's group fitted the S2+, I just had to roughen up the threading on the head-side a bit to have it make electrical contact.

On the driver I changed the modes that I described above a bit (by relocating some wires and swapping a resistor on channel 4 from 39KOhm to 911 Ohm) to make the UI still more to my liking. Now the UI starts with 5lumen low on the amber led, then 60 lumen on the WW XP-L Hi, then 700 lumen on the XP-L Hi, last 160 lumen on the 96CRI 4500K SSL80 led. I ran out of 22AWG teflon wire, so I bought a new batch on ebay, from now on many mods will have purple wires! :-)

The mod is basically the same mod as the second red S2+ that I did lately, in short: it is a Convoy S2+ shorty that accomodates a 18500 battery, the extra space was created by using triple optics, triple Noctigon, drastically shortened pill by cutting off the led-shelf and much of the threading so that there's only just enough space inside for the driver, soldered a 1mm copper disc on top as a new led-shelf, soldered the triple Noctigon on top of that. The springs are intl-outdoor CU-Beryllium springs, but the one on the driver side was made smaller by cutting one complete turn off the wire. The glass lens was kept in place before the optic.

Of course not all modding went smoothly, everything had to be re-done at least once, and the worst what happened was that the driver seemed dead at a certain point, and I spent two hours trying to find the fault, gave up, tried again and found that the led+ pad was right next to the MCU and that it shorted to an invisible but apparently exposed pad under the chip :tired:

The netto result looks like this:

I'm really glad with the result! The UI is channel1->channel2->channel3->channel4->3boringblinkymodes. The blinkies would be annoying but because the driver resets after a pretty short half-long press (1 second) , from all modes you can directly get to start again. This is what's finally on the channels:

channel nr resistor value between MCU and transistor the led that is wired to this channel tail-current on a Sanyo 1700mAh 18500 output measured in integrating sphere runtime on a 1700mAh Sanyo 18500 battery
1 39 kOhm ProLight PK2N pc-amber 27 mA 5.5 lumen 2.5 days
2 4.7 kOhm XP-L HI U4 7A1 3000K 240 mA 68 lumen 7 hours
3 455 Ohm (transistor swapped with FET) XP-L HI U4 7A1 3000K 3.5 A 700 lumen 30 minutes
4 910 Ohm Oslon SSL80 4500K 96CRI 1.0 A 185 lumen 1.7 hours

So the 5.5 lumen low is now done by the pc-amber led, what feels right and is useful as a night-stand light, the x10 mode spacing to mid and to high is exactly what I like best (700 lumen in warm white :love: ), and the SSL80 96CRI led is good for seeing true colours if that is needed.

*The high setting is not sustainable, after a minute it gets too hot to hold.

*I do not like the beam of the XP-L HI through the Carclo very much, it is a bit square-ish. Works fine no problem, but it is not perfect.

*The SSL80 beam is a bit off-center, again fine but not a perfect beam. The led must have been reflowed just a bit off the center on the solder pads.

*all modes are true current without PWM, so the efficiency on the low modes is as good as it can be.

As a FYI, I tried a lighted tailcap with this driver (with warm white leds in the tail I would have a real moon-mode on top of the UI), soldered a 470 Ohm bleeder resistor and screwed on the lighted tailcap of my red S2+ to check. Well, it does not work, the reset time after switch-off gets really really short, so that any mode change attempt turns into a reset to channel1. So I called it a day and removed the bleeder again.

I have one more mod using this driver in the planning, with the four channels all on the same led, so not a triple. Resistor tweaking on channels 1-2-3 and a FET on channel 4, I think a LFPAK33 FET will swap right in too. The currents will be 6mA->60mA->600mA->direct drive.

Very cool modding! These are the kinds of things I think of but don’t often try. Although I’ve tried a few things but have been intimidated by writing up the process.

Very nice mod Djozz! I too really like the 3000K XPL HI, nice application here!.

Do you think soldering on potentiometers in place of the resistors would work?

I had been thinking about that too, it should work well because the path that the potmeter is in does not carry a lot of current.

I was also thinking that if you wanted all four, or three emitters running at the same current, say 1.9A, you could use just one trim pot soldered to one of the resistor pads with leads running back to the pads for the other resistors.

When you were trying various resistors, did you try it with no resistor and and just a bridged pad?