Methods for constant current (no PWM) in driver design (not existing drivers)

Not having much clue about electronics, I had a look into the intl-outdoor colour MC-E driver, which seem to work with transistors, perhaps that is a way to go?? I stopped going any further with it (want to find out the maximum current that can be achieved with these transistors before they really blow), but I am still planning to go on with it some day..

+1

Well, for startes it’s out of stock… but if it wasn’t:
1: It’s 5A. My light runs three MT-G2s at ~6A each (theoretically).
2: It’s not MT-G2 ready.
3: I can’t configure my own modes as I please.
4: It’s too small.
5: Part of the fun with this hobby for me is designing my own drivers. The idea is an improvement on my driver in this light: Mod: My SupFire M6 "BMF" edition (new beamshots in OP).

Hmm, very interesting indeed. I’ll take a closer look at that.

Anyone other suggestions? Or am I asking for trade secrets?

There is also the LD-25 and LD-29

http://www.fasttech.com/products/1612/10001997/1143103

and the LD-2C

http://intl-outdoor.com/ld2c-3a-12-cell-circuit-board-p-732.html
http://lygte-info.dk/review/DriverTest%20LD-2C%203A%201-2%20Cell%20UK.html

But these are all around 3A. But they have no PWM!

I would also like a powerful 2 cell linear driver for mt-g2 or the new xhp70.

I’ve updated the OP. Hopefully it’s a little more clear what I’m asking for now, which is not suggestions for constant current drivers but rather information on how such a driver can be made.

Take a look at Wight's driver design based off of the 7136 chip. It isn't 100% true constant current, but very close to it. The PWM is virtually undetectable, although it is still there. I would consider this driver to be a good starting point for what you want to do, unless your goal is 100% PWM free.

I would take a read of that thread.

I believe this to be the most economical solution, and easiest to adapt to new driver designs using existing open source attiny software. JonnyC has begun his FW port to the attiny25 (I've tested semi-functional versions), and in turn the 45/85 as well, so if you want more FW space I don't think that will be a problem. Don't bug him too much about it though, as he's busy with his real job right now as well. Just know he's working on it.

I'm currently in the process of designing a driver to do this, I dont want to share everything cause it's taking me a LOT of work and I plan to keep it proprietary (so that spending so much time on it is actually worth it to me) but the way it works is this (also note it uses a more capable uC, a 13A wont work, to many I/O's needed)- I'll repeat, a 13A CAN NOT BE USED FOR THIS UNLESS YOU ONLY WANT 2 MODES! I'll be using a PIC (16F1824) but there are plenty of AVR's that could handle it too, I recommend at least 4 I/O's, more modes need more I/O channels.

It's a buck driver, current is controlled via high side sense resistor (a stack of parallel resistor's). There are also additional sense resistor's that are wired in parallel however each one routed threw a FET, each FET is controlled by a different I/O pin from the uC, the level is changed by adding / subtracting sense resistor's. THERE IS ZERO PWM AT ANY LEVEL, it's TRUE constant current in all levels. The FET's are simply turned on or off.


I've got all my component's picked out as well as testing this idea on BU_CK, however I dont yet have a FW to do this and am waiting on my initial test boards.


edit: to further clarify, yes its true CC, no there is absolutely no PWM at all, in fact the uC isnt even setup for PWM, it simply pull's the output pin's (to the FET's gate's) high or low depending on what mode is desired. Ther driver changes brightness based on the total sense resistance.

I am a new guy myself, and am returning to electronics after almost 15 years. I understand the desire to design one’s own driver. I am working on a couple myself (PWM based), not because there are not any available or that I think I can do better, but more for the experience and education.

I imagine one could turn a FET on only part way by feeding the PWM signal through an DAC/low pass filter before going to the FET. But, the power (heat) used by the FET would have to be addressed. The FET gate voltage would also have to be closer to the max output voltage of the DAC where in a direct drive system it is desirable to have the gate voltage at which the FET “turns full on” a bit lower then the output if the ATtiny13. It is more complicated then this, and would have to be fit onto an appropriate sized driver board, but it is an idea.

One could then use a low value sense resistor (0.005ohm) and an op-amp for feedback to the processor to allow for current regulation…

I am sure someone more knowledgeable will voice a better idea. I am also sure that there are drivers here that do something like this, perhaps the driver mentioned by RMM above, I have not looked into them much.

EDIT: As I said, someone more knowledgeable would post, like CK did while I was composing my reply.

This is what the popular LD-1 does. It varies the gate voltage using an op-amp in order to run the FET in the linear region. Of course, with any linear driver, heat can be a concern where Vin is a lot greater than Vout. This is the inherent problem with designing a high amp linear driver on a small board, especially for MT-G2 use (lower relative vF, twice the voltage). On a bigger board like what Mike C is looking to do in an M6, I think that the heat will be manageable.

Goal is PWM free.

I don’t think I need the ATTiny25/45/85 for it (read below). If I do I don’t think it’s that much of a big deal to program them. I’ve read the datasheets and it does not look like that much of a big deal really. No need to bug Johnny, I have a few 25s and 85s to play with and have planned to do it someday, I just haven’t taken the time yet.

I’m not following you here. The ATTiny13a has six I/Os. Sure, they can’t all do everything, but they can all do simple high/low output. One I/O will be used for the voltage monitoring input and another for the off time cap input. The remaining four I/Os are free. All I need the ATTiny13a to do is output either high or low on either of the four remaining outputs. If I connect a certain amount of 7135s to these outputs and set that pin to high they will be totally PWM free too. Or am I missing something?

Weather using 7135s is a crappy idea or not, I still don’t see anything in the ATTiny13a datasheet that suggests that each of the four remaining I/Os cannot be used to simply output high to trigger a component, or a chain of them, be they 7135s or something else.

A lot has been said so far, so I’ll probably miss addressing some things.

  • Cereal_killer’s method works. This is the exact method used in the DQG 26650 flashlight. It will work for anything which uses sense resistors, so it could be easily adapted to the QX7136 based linear driver for example. In buck or boost drivers you can probably get away with small, high resistance FETs for switching the sense resistors (and just deal with the losses). In a linear driver like the QX7136 you would need to use low-resistance FETs.
  • Mike C, you are right to think that the ATtiny13A has 4 available IO pins. Your idea will work. One of those IO pins is the Reset pin. You can use normal ISP (USBasp) to fuse the pin as “IO” rather than “Reset”. Once that has been done you cannot use ISP anymore, you must use high-voltage programming or at least a “high voltage rescue” setup. See a discussion of this and suggestions/solutions starting with post #52 in my thread here: 17mm DD+7135 — linear regulated driver w/ FET turbo
  • Also take a look at the same thread for some code examples Werner posts for dealing with the extra IO.
  • I’ve personally verified that there is no PWM on any level of the LDCH LD29 driver’s output. I’ve been unable to figure out how the driver works though. I think my problems are largely due to being unable to identify IC’s. I have a thread where I posted measurements and information about the driver.

Some disadvantages of the swapping sense resistors method:

  • It requires a lot of space.
  • Requires extra sense resistors: if sense voltage is low then these are costly.
  • No way to change the mode levels with programming: you can only change the UI in the program.
  • No possibility of ramping modes.

Ahh, the reset pin, yeah I read about that in the datasheet… but like you in the 17mm DD+7135 thread I’d forgotten about it. You probably saved me from a decent headache.
I’ll still consider using it, but at least now I know I can’t just simply re-flash the MCU.

Here’s a method I’ve used in the past for a variable output laser driver. A fairly slow pwm is filtered to analog by c1 and r5, then divided down to sense resistor voltage levels by r3/r4. The opamp modulates the FET gate to maintain constant current by monitoring the sense resistor r1, and its reference voltage is set by the microcontroller to adjust the current.

Thank’s tterev3. After seeing led4power’s op-amp based linear driver it seemed clear that an R/C filter plus a op-amp could be used together to do this but I’ve struggled a little bit with the implementation. :frowning:

For MT-G2 use I think we can be much less picky about components than led4power had to be. With such a high input voltage we don’t have to be picky about FET gate voltage specifications or about the op-amp’s ability to get close to the positive rail.

You have to be careful running FETs in their linear region or even at DC. You can easily exceed their safe operating area. Pay careful attention to the safe operating area graphs… even what looks like a big honkin’ beefy FET can have wimpy, wimpy, DC ratings.

I’m not seeing that problem with any of the FETs we’ve been using. I’ve scrutinized the datasheets pretty closely for FETs like PSMN3R0-30YLD and others we’ve been using / discussing recently. I see nothing to worry about. Do you see anything to worry about?

The main issue is trying to run a FET in the linear region. Most FETs are not designed for that. They want to be full on or full off. I’ve seen a lot of variable DC load designs that failed spectacularly because of improper FET choices.

TP I do understand that (you expressed it clearly in your last post). I’m asking whether you have any insight beyond a fairly vague warning that “it might fail.”

As I said, I’ve looked over the data and it seems alright to me. I’ve already put a small handful of modern N-channel power MOSFETs (the ones we use and talk about here on BLF for DD drivers) in the linear region and they seemed happy to me. We’re well within both dissipation ratings and DC current ratings.

I’ve also waded into this document some, but haven’t fully digested everything:
https://www.digikey.com/Web%20Export/Supplier%20Content/microsemi_278/pdf/microsemi-power-an-make-linear-mode-work.pdf

My head is spinning after reading so many datasheets of different types of regulators and so on… It’s over my head… as is using FETs and/or MOSFETs in the linear region.

The 7135s don’t seem to be that bad really. Vf over them is not that much higher from than many regulators out there, and spreading the heat over so many chips isn’t such a bad thing. They’re easy to use in parallel and don’t require any resistors.

I’ve ordered a bunch of those cheap D882 transistors (from djozz thread) to play around with. If they don’t work out I think I’ll just stick with 7135s… for now at least.

I don’t think you’ll be doing CC w/ modes using those D882 transistors…