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

28 posts / 0 new
Last post
djozz
djozz's picture
Offline
Last seen: 9 hours 25 min ago
Joined: 09/07/2012 - 17:04
Posts: 17460
Location: Amsterdam
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

Edited by: djozz on 04/18/2016 - 05:56
WarHawk-AVG
WarHawk-AVG's picture
Offline
Last seen: 7 months 2 weeks ago
Joined: 01/04/2014 - 06:47
Posts: 5071
Location: H-Town

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 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

Quote:
hFE of a transistor is the current gain or amplification factor of a transistor.

hFE (which is also referred to as β) is the factor by which the base current is amplified which is fed into the transistor.

A transistor works by feeding a base current into the base of the transistor. The base current is then amplified by hFE to yield its amplified current. The formula is below:

IC= hFEIB=βIB

So if 1mA is fed into the base of a transistor and it has a hFE of 100, the collector current will be 100mA.

Every transistor has its own unique hFE. The hFE is normally seen to be a constant value, normally around 10 to 500, but it may change slightly with temperature and with changes in collector-to-emitter voltage.

Check the transistor’s datasheet for the hFE value in its specifications.

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?

Quote:
The low output impedance allows a source with a large output impedance to drive a small load impedance; it functions as a voltage buffer. In other words, the circuit has current gain (which depends largely on the hFE of the transistor) instead of voltage gain. A small change to the input current results in much larger change in the output current supplied to the output load.
djozz
djozz's picture
Offline
Last seen: 9 hours 25 min ago
Joined: 09/07/2012 - 17:04
Posts: 17460
Location: Amsterdam

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 Laughing).

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.

islisis
Offline
Last seen: 4 years 9 months ago
Joined: 03/22/2013 - 23:22
Posts: 352
Location: Tokyo, Japan
djozz wrote:

is it an idea to build a BLF-RGBW driver based on these, with better modes than the intl-outdoor one?

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 =)

tterev3
Offline
Last seen: 6 hours 45 min ago
Joined: 03/28/2014 - 11:22
Posts: 304
Location: NC, USA
islisis wrote:
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:http://tterev3.blogspot.com/2012/10/super-rgbwuv-flashlights.html

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: http://budgetlightforum.com/node/30783

djozz
djozz's picture
Offline
Last seen: 9 hours 25 min ago
Joined: 09/07/2012 - 17:04
Posts: 17460
Location: Amsterdam

tterev3 wrote:
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:http://tterev3.blogspot.com/2012/10/super-rgbwuv-flashlights.html 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: http://budgetlightforum.com/node/30783[/quote]

So it might be easier than I thought to (re)build this driver Smile . 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 Smile )

Cereal_killer
Cereal_killer's picture
Offline
Last seen: 1 year 2 weeks ago
Joined: 07/22/2013 - 13:10
Posts: 4005
Location: Ohio

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 1× 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.

 RIP  SPC Joey Riley, KIA 11/24/14. Now I am become death, the destroyer of worlds.

djozz
djozz's picture
Offline
Last seen: 9 hours 25 min ago
Joined: 09/07/2012 - 17:04
Posts: 17460
Location: Amsterdam

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.

texaspyro
Offline
Last seen: 1 year 6 months ago
Joined: 04/29/2011 - 12:43
Posts: 4593

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.

WarHawk-AVG
WarHawk-AVG's picture
Offline
Last seen: 7 months 2 weeks ago
Joined: 01/04/2014 - 06:47
Posts: 5071
Location: H-Town
tterev3 wrote:
islisis wrote:
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:http://tterev3.blogspot.com/2012/10/super-rgbwuv-flashlights.html

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: http://budgetlightforum.com/node/30783

ding ding ding Smile

Oh and apologies…I totally forgot the RGBW mastah tterev3

djozz
djozz's picture
Offline
Last seen: 9 hours 25 min ago
Joined: 09/07/2012 - 17:04
Posts: 17460
Location: Amsterdam

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

...and renaming it Smile

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

MRsDNF
MRsDNF's picture
Offline
Last seen: 3 weeks 1 day ago
Joined: 12/22/2011 - 21:18
Posts: 13473
Location: A light beam away from the missus in the land of Aus.

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

 

djozz quotes, "it came with chinese lettering that is chinese to me".

                      "My man mousehole needs one too"

old4570 said "I'm not an expert , so don't suffer from any such technical restrictions".

Old-Lumens. Highly admired and cherished member of Budget Light Forum. 11.5.2011 - 20.12.16. RIP.

 

djozz
djozz's picture
Offline
Last seen: 9 hours 25 min ago
Joined: 09/07/2012 - 17:04
Posts: 17460
Location: Amsterdam

MRsDNF wrote:
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.

djozz
djozz's picture
Offline
Last seen: 9 hours 25 min ago
Joined: 09/07/2012 - 17:04
Posts: 17460
Location: Amsterdam

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! Smile

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.

LightRider
LightRider's picture
Offline
Last seen: 2 years 9 months ago
Joined: 08/05/2015 - 09:52
Posts: 2007
Location: U.P. MI, USA

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.

ReManG
Offline
Last seen: 1 week 1 day ago
Joined: 04/25/2015 - 22:52
Posts: 2662
Location: Between the Mexico's

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

Ouchyfoot
Ouchyfoot's picture
Offline
Last seen: 10 months 1 week ago
Joined: 09/01/2012 - 06:15
Posts: 5089
Location: Canada

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

djozz
djozz's picture
Offline
Last seen: 9 hours 25 min ago
Joined: 09/07/2012 - 17:04
Posts: 17460
Location: Amsterdam

Ouchyfoot wrote:
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.
Ouchyfoot
Ouchyfoot's picture
Offline
Last seen: 10 months 1 week ago
Joined: 09/01/2012 - 06:15
Posts: 5089
Location: Canada

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.

Ouchyfoot
Ouchyfoot's picture
Offline
Last seen: 10 months 1 week ago
Joined: 09/01/2012 - 06:15
Posts: 5089
Location: Canada

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

djozz
djozz's picture
Offline
Last seen: 9 hours 25 min ago
Joined: 09/07/2012 - 17:04
Posts: 17460
Location: Amsterdam

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

No I did not try that. These transistors are limited in their power rating (can’t remember what it was) and the way that they are connected, they are not, like 7135 chips, cooled by a pad directly connected to the ground ring. I think that maybe 1.5A is what they can handle at maximum (assuming that they burn off, say, 0.8V overvoltage with a fully charged battery). So for a high current channel a FET is needed, the next level can be provided by one of the transistors at 1-1.5A.
alpg88
Offline
Last seen: 50 min 40 sec ago
Joined: 10/11/2013 - 12:35
Posts: 992
Location: usa

Cereal_killer wrote:
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 1× 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.

i realize the thread is over 3 years old, but do you still mod, and sell drivers? i would like to buy some.

djozz
djozz's picture
Offline
Last seen: 9 hours 25 min ago
Joined: 09/07/2012 - 17:04
Posts: 17460
Location: Amsterdam

alpg88 wrote:
Cereal_killer wrote:
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 1× 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.

i realize the thread is over 3 years old, but do you still mod, and sell drivers? i would like to buy some.


Cereal_killer has not been seen on BLF for more than year now, but tterev3 is around, and he even has released some new drivers recently.
alpg88
Offline
Last seen: 50 min 40 sec ago
Joined: 10/11/2013 - 12:35
Posts: 992
Location: usa

thank you, djozz, i will contact tterev3.

tterev3
Offline
Last seen: 6 hours 45 min ago
Joined: 03/28/2014 - 11:22
Posts: 304
Location: NC, USA
alpg88 wrote:
thank you, djozz, i will contact tterev3.

Here’s my driver info thread: http://budgetlightforum.com/node/51735

Rufusbduck
Rufusbduck's picture
Offline
Last seen: 1 month 2 weeks ago
Joined: 04/04/2012 - 15:34
Posts: 10389
Location: Golden state

For some reason I missed this thread entirely. There’s so much I don’t know about even the more simple to understand circuits but I enjoy seeing them futzed with like this. So the center pin/tab is led-, left pin(tab on top) is control pin(base), and right pin is ground. I wonder if an RC filter could be placed in the pwm trace to control the voltage on the base. A sort of D/A converter with the output range tuned to the resistance range of the transistor.

Three Tanna leaves to give him life, nine to give him movement. But what if he eats the whole bag?

Scott

djozz
djozz's picture
Offline
Last seen: 9 hours 25 min ago
Joined: 09/07/2012 - 17:04
Posts: 17460
Location: Amsterdam

Rufusbduck wrote:
For some reason I missed this thread entirely. There’s so much I don’t know about even the more simple to understand circuits but I enjoy seeing them futzed with like this. So the center pin/tab is led-, left pin(tab on top) is control pin(base), and right pin is ground. I wonder if an RC filter could be placed in the pwm trace to control the voltage on the base. A sort of D/A converter with the output range tuned to the resistance range of the transistor.

I don’t think there is pwm at all in this driver, just per channel a standard voltage/current coming from the MCU that in the firmware is either switched on or off. The resistor value in between MCU and transistor determines how much of the current/voltage reaches the gate of the transistor and so how much current goes from ground to led.
(but none of the electronics experts at BLF ever commented on this driver, so I could be wrong)

But soon this thread will loose relevance, the driver is only still for sale at Mtn now, and there’s currently just 15 pieces left, I doubt that Hank will be making more of them….

Rufusbduck
Rufusbduck's picture
Offline
Last seen: 1 month 2 weeks ago
Joined: 04/04/2012 - 15:34
Posts: 10389
Location: Golden state

That could mean the value is simply set to 255/255 but if pwm were used then maybe some kind of D/A converter could be used to convert the pwm signal to a variable voltage. Moot point if the driver disappears as have many others.

Three Tanna leaves to give him life, nine to give him movement. But what if he eats the whole bag?

Scott